Re:Goodbye “undefined is not a function”
by kevan on Sunday February 22, 2015 @06:50PM
(#9091793)
This would help a lot in case where you have multiple calls chained together.
What's undefined, bar, fiz, or buz? Then you have to set a breakpoint to find out. Most people I know try to avoid writing code like this, but Knockout ViewModels are a common place where this bites me.
[ Parent
| on HN ]
If bar() or fiz() return undefined (i.e. don't return at all), then you will still get the same error as usual undefined is not an object, I reckon.