Discussions

Ask a Question
Back to All

Get

Hi, I need help
I'm trying build a status message in view, like "Browser Enable" or "Browser Blocked". So, I made this:

if(pushcrew.isAPIReady) {
 if (console.log(pushcrew.subscriberId) === false){
   $('.inactive-push').attr("hidden",false);
 } else if (console.log(pushcrew.subscriberId) === -1){
   $('.blocked-push').attr("hidden",false);
 } else {
   $('.active-push').attr("hidden",false);
 }

}

I can run this in console normally, and work right, but, when I try put this in my code, I get a error like "Uncaught ReferenceError: pushcrew is not defined"