Chaplin.js - Uncaught TypeError: Cannot read property 'undefined' of undefined

62 Views Asked by At

Sometimes I get an error like this errors. Why do they occur?

1

There are 1 best solutions below

1
DenizEng On

This would happen if you're trying to access a property of an undefined value. For example:

var test; // test is now undefined, typeof(test) would return "undefined"
test.myPropertyName // => throws 'Uncaught TypeError: Cannot read property 'undefined' of undefined'

So, sounds like you're trying to perform an operation using an uninitalized variable.