Skip to content

Commit

Permalink
fix(event): add a temporary workaround for a bug in Cesium Event impl…
Browse files Browse the repository at this point in the history
…ementation

See CesiumGS/cesium#5827
  • Loading branch information
speigg committed Sep 14, 2017
1 parent cc08177 commit a99e950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Event<T> {
*/
onNext(listener: (data: T) => void, scope?:any) : void {
let remove = this.addEventListener((data)=>{
remove();
Promise.resolve().then(()=>remove()); // temporary workaround for https://github.com/AnalyticalGraphicsInc/cesium/issues/5827
listener.apply(scope, data);
});
}
Expand Down

0 comments on commit a99e950

Please sign in to comment.