I recently started working with Angular, and so far I'm loving the links in the error messages that give you incredible detail about the error.
However, I'm encountering an extremely vague JavaScript error:
TypeError: Cannot read property 'data' of undefined
at new <anonymous> (ui-grid.min.js:7)
at Object.invoke (angular.js:4709)
at R.instance (angular.js:10234)
at m (angular.js:9147)
at angular.js:9553
at angular.js:16170
at m.$eval (angular.js:17444)
at m.$digest (angular.js:17257)
at m.$apply (angular.js:17552)
at l (angular.js:11697)
(anonymous function) @ angular.js:13708
(anonymous function) @ angular.js:10347
(anonymous function) @ angular.js:16178
$eval @ angular.js:17444
$digest @ angular.js:17257
$apply @ angular.js:17552l
@ angular.js:11697K
@ angular.js:11903y.onload
@ angular.js:11836
Because I'm using ui-grid, data
is in a hundred places, I tried to go through one by one to see if anything looks off, but it got so tedious.
What is a good way to debug this error when no code I've written is referenced in the error?
NOTE: I'm not asking how to fix this specific error, or even what this error means. I'm asking how to find what part of my code it is referencing.