I check for a property on an object but it returns undefined even though it is there. I assume I am testing in the wrong way?
I run this
console.log(self.modules[moduleId]);
and it outputs this:
Object
composed: Array[2]
prototypes: Array[2]
slideshow: Slideshow
cardFront: false
currentSlide: 2
(So "slideshow" is an object, an instance of my class "Slideshow".)
I step in one step further to do this:
console.log(self.modules[moduleId].slideshow);
And it returns undefined.
My if-statement looks like this, although above is probably enough to get my issue.
if ( typeof( self.modules[moduleId].slideshow == 'undefined' ) ) {