Chrome appears to report wrong line for error

后端 未结 1 604
孤独总比滥情好
孤独总比滥情好 2021-01-20 20:13

I\'m getting an error on line 975 ( this is what the console reports ), but when I look at the code it is clearly not 975.

Cannot read property E of undefined:

相关标签:
1条回答
  • 2021-01-20 20:52

    It's possible Chrome isn't reporting the specific line, but using line 975 as a reference to the segment of the code where property E doesn't seem to be found, thus line 975 could be in the middle of whatever code is problematic (some debuggers do this instead of reporting the first line they find a problem on - maybe Chrome's interpreter works like this, I don't know though, since I use Firefox for development instead). In that case, it would mean that this is what's undefined and there's your problem.

    We'd have to see more to get a grip on why this would be happening since we can't determine what the context for this is from the screenshot. What is the expected value of this and if this is part of an object definition that you instantiate later, how do you instantiate it, as the context could matter for the value of this.

    0 讨论(0)
提交回复
热议问题