Skip to content

Commit

Permalink
fix(SebMGoogleMapMarker): 0 value for lat/lng
Browse files Browse the repository at this point in the history
fixes #82
  • Loading branch information
sebholstein committed Jan 30, 2016
1 parent 5f8a544 commit 8fe5f40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/directives/google-map-marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ export class SebmGoogleMapMarker implements OnDestroy,

/** @internal */
ngOnChanges(changes: {[key: string]: SimpleChange}) {
if (!this._markerAddedToManger && this.latitude && this.longitude) {
if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {
return;
}
if (!this._markerAddedToManger) {
this._markerManager.addMarker(this);
this._markerAddedToManger = true;
this._markerManager.createClickObserable(this)
Expand Down

0 comments on commit 8fe5f40

Please sign in to comment.