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

Post all technical issues and questions here. We'll gladly help you wherever we can.
Post Reply
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

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

Post 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.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 430
Joined: Mon Apr 06, 2020 1:54 pm

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

Post by fapnip »

For a method that will basically fill this feature request, see this post.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests