Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit b07d8f1

Browse files
committed
Merge pull request #1 from glebm/master
Fix event binding edge case
2 parents 6331ed6 + e69a112 commit b07d8f1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ui-map.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@
9292
restrict: 'A',
9393
link: function (scope, elm, attrs) {
9494
scope.$watch(attrs[directiveName], function (newObject) {
95-
bindMapEvents(scope, events, newObject, elm);
95+
if (newObject) {
96+
bindMapEvents(scope, events, newObject, elm);
97+
}
9698
});
9799
}
98100
};
@@ -122,4 +124,4 @@
122124
mapOverlayDirective('uiMapGroundOverlay',
123125
'click dblclick');
124126

125-
})();
127+
})();

0 commit comments

Comments
 (0)