Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeliveryMap-Cannot read property 'length' of null #308

Open
RahimPasha opened this issue Apr 6, 2021 · 1 comment
Open

DeliveryMap-Cannot read property 'length' of null #308

RahimPasha opened this issue Apr 6, 2021 · 1 comment

Comments

@RahimPasha
Copy link

Apparently, there is a little bug in DeliveryMap.js when markers is null at lines 21 and 40. It is not checking for null.
line 21: if (map.addedMarkers.length !== markers.length){
line 40: markers.forEach((marker, index) => {

So, I changed line 21 to:
if ((map.addedMarkers && markers) && (map.addedMarkers.length !== markers.length)) {
and added a condition for the else at line 39:
else if (markers) {
It works perfect now.

@lohithgn
Copy link

@RahimPasha you should create Pull Request of the fix. Somebody from the team will review and take it forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants