Mercurial > hg > webaudioevaluationtool
changeset 2714:52224b9d6e8b
Undefined vs null conditional checks in core.js
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 14 Apr 2017 16:04:05 +0100 |
parents | 2dfc19a33bbc |
children | 23f84278dc2a |
files | js/core.js |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/js/core.js Fri Apr 14 16:02:52 2017 +0100 +++ b/js/core.js Fri Apr 14 16:04:05 2017 +0100 @@ -1202,7 +1202,7 @@ // Get the data from Specification var pagePool = []; for (var page of specification.pages) { - if (page.position !== null || page.alwaysInclude) { + if (page.position !== undefined || page.alwaysInclude) { page.alwaysInclude = true; } pagePool.push(page) @@ -1215,7 +1215,7 @@ // Now get the order of pages var fixed = [] for (var page of pagePool) { - if (page.position !== null) { + if (page.position !== undefined) { fixed.push(page); var i = pagePool.indexOf(page); pagePool.splice(i, 1);