Skip to content

Commit 9fa1f9a

Browse files
committed
Merge pull request angular-ui#293 from hlxwell/master
fixed the _.defer require a function not a expression bug.
2 parents 6c07a25 + 64972ee commit 9fa1f9a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dist/angular-google-maps.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2628,7 +2628,9 @@ Nick Baugh - https://github.com/niftylettuce
26282628
if (newValue === oldValue || newValue === _m.zoom) {
26292629
return;
26302630
}
2631-
return _.defer(_m.setZoom(newValue));
2631+
return _.defer(function(){
2632+
_m.setZoom(newValue)
2633+
});
26322634
});
26332635
scope.$watch("bounds", function(newValue, oldValue) {
26342636
var bounds, ne, sw;

src/coffee/directives/map.coffee

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ angular.module("google-maps").directive "googleMap", ["$log", "$timeout", ($log,
214214
), true
215215
scope.$watch "zoom", (newValue, oldValue) ->
216216
return if newValue is oldValue or newValue is _m.zoom
217-
_.defer _m.setZoom newValue
217+
_.defer ->
218+
_m.setZoom newValue
218219

219220
scope.$watch "bounds", (newValue, oldValue) ->
220221
return if newValue is oldValue

0 commit comments

Comments
 (0)