Skip to content

Commit a99e950

Browse files
committed
fix(event): add a temporary workaround for a bug in Cesium Event implementation
See CesiumGS/cesium#5827
1 parent cc08177 commit a99e950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/event.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class Event<T> {
3434
*/
3535
onNext(listener: (data: T) => void, scope?:any) : void {
3636
let remove = this.addEventListener((data)=>{
37-
remove();
37+
Promise.resolve().then(()=>remove()); // temporary workaround for https://github.com/AnalyticalGraphicsInc/cesium/issues/5827
3838
listener.apply(scope, data);
3939
});
4040
}

0 commit comments

Comments
 (0)