Skip to content

Commit cde5f2d

Browse files
committed
Don't call removeMarkers() when there are no orphaned
1 parent 3408636 commit cde5f2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/angular-google-maps.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@
466466
orphaned.push(v);
467467
}
468468
});
469-
470-
_m.removeMarkers(orphaned);
469+
470+
orphaned.length && _m.removeMarkers(orphaned);
471471

472472
// Fit map when there are more than one marker.
473473
// This will change the map center coordinates

0 commit comments

Comments
 (0)