-
Notifications
You must be signed in to change notification settings - Fork 516
TypeError: Cannot read property '1' of null #877
Comments
When you define an event your code must look like this |
Well, but I got this error at the same moment I required the library: |
I cannot reproduce this error. |
This can be happening for others libs I'm using in my project? |
Also, I'm think if you add the validation I placed in my library in order to fix the bug can't be bad for you're library. I'm mean checking for an object existence before using his properties won't affect the code. In this case before: |
Let me add all my dependencies in plunker in order to get the same error |
I'm using ng-map version 1.18.4 with angularjs version 1.6.9, when I set a map in my app its shows ok but breaks app, the error is the following?
![ng-map error](https://user-images.githubusercontent.com/31218194/47460918-870eac80-d7ad-11e8-86f7-0e45c19c0df6.png)
When I inspect the library code in line 2684:
var matches = attrValue.match(/([^\(]+)\(([^\)]*)\)/);
and the line 2685:
var funcName = matches[1];
The problem is that are calling a property of a null variable, first I think that was an inittialization problem with the map, but all the examples I found worked ok, so I add this code to my ng-map library in line 2685:
if (matches === null) { return; }
and voila problem solve, please tell me if there is a way to avoid overriding you're library or there is something I'm doing wrong, thanks in advance.
The text was updated successfully, but these errors were encountered: