Skip to content

Commit a6e12fa

Browse files
committed
null checks in handleClick for dealing with missing positions
1 parent f73b71a commit a6e12fa

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

dist/angular-google-maps.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,11 +3089,14 @@ Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawi
30893089
}
30903090
click = (function(_this) {
30913091
return function() {
3092-
var pos;
3092+
var pos, _ref, _ref1;
30933093
if (_this.gWin == null) {
30943094
_this.createGWin();
30953095
}
3096-
pos = _this.scope.coords != null ? _this.gWin.getPosition() : _this.getGmarker().getPosition();
3096+
pos = _this.scope.coords != null ? (_ref = _this.gWin) != null ? _ref.getPosition() : void 0 : (_ref1 = _this.getGmarker()) != null ? _ref1.getPosition() : void 0;
3097+
if (!pos) {
3098+
return;
3099+
}
30973100
if (_this.gWin != null) {
30983101
_this.gWin.setPosition(pos);
30993102
if (_this.opts) {

0 commit comments

Comments
 (0)