Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara authored Apr 10, 2024
1 parent f2f91cf commit cd8a043
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mono/browser/runtime/scheduling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ function mono_wasm_schedule_timer_tick () {

export function monoSafeSetTimeout (userCallback: (() => void), timeout: number): number {
Module.runtimeKeepalivePush();
return setTimeout(function () {
return setTimeout(() => {
try {
Module.runtimeKeepalivePop();
if (!loaderHelpers.is_runtime_running()) {
return;
}
Module.runtimeKeepalivePop();
userCallback();
Module.maybeExit();
} catch (e) {
Expand Down

0 comments on commit cd8a043

Please sign in to comment.