Page 1 of 1

EOS Feature Request: isEnabled return undefined instead of true for undefined pages

Posted: Thu Apr 16, 2020 2:21 pm
by fapnip
See the following example:

Code: Select all

var test1 = pages.isEnabled('a-good-and-enabled-page')
console.log('Result1', test1) // true, as it should be.
var test2 = pages.isEnabled('a-non-existent-page')
console.log('Result2', test2) // incorrectly true.  Could this be undefined to signal missing page?
Could this be changed so isEnabled returns undefined to signal a non-existing page instead of true?

This would be helpful in auto-generating page id arrays.

Re: EOS Feature Request: isEnabled return undefined instead of true for undefined pages

Posted: Sun Oct 11, 2020 6:54 pm
by fapnip
For a method that will basically fill this feature request, see this post.