Skip to content

Commit

Permalink
fix(map): wait for map created before handling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wykks committed Mar 18, 2018
1 parent fb9b060 commit 87a5da9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/lib/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ export class MapComponent implements OnChanges, OnDestroy, AfterViewInit, MapEve
this.MapService.destroyMap();
}

ngOnChanges(changes: SimpleChanges) {
async ngOnChanges(changes: SimpleChanges) {
await this.MapService.mapLoaded$.toPromise();
if (changes.cursorStyle && !changes.cursorStyle.isFirstChange()) {
this.MapService.changeCanvasCursor(changes.cursorStyle.currentValue);
}
Expand Down

0 comments on commit 87a5da9

Please sign in to comment.