blazor-workshop icon indicating copy to clipboard operation
blazor-workshop copied to clipboard

DeliveryMap-Cannot read property 'length' of null

Open RahimPasha opened this issue 4 years ago • 1 comments

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.

RahimPasha avatar Apr 06 '21 11:04 RahimPasha

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

lohithgn avatar Dec 20 '21 09:12 lohithgn