Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lanesawyer committed Nov 12, 2024
1 parent 308668f commit b4fdefa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/scatterbrain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
"lodash": "^4.17.21",
"regl": "^2.1.0"
}
}
}
8 changes: 4 additions & 4 deletions packages/scatterbrain/src/abstract/async-frame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function beginFrame<
if (synchronous) {
lifecycleCallback(event);
} else {
Promise.resolve().then(() => lifecycleCallback(event))
Promise.resolve().then(() => lifecycleCallback(event));
}
};

Expand Down Expand Up @@ -158,18 +158,18 @@ export function beginFrame<
}
};

reportStatus({ status: 'begin' }, true)
reportStatus({ status: 'begin' }, true);
const interval = setInterval(() => doWorkOnQueue(interval), queueProcessingIntervalMS);
if (queue.length > 0) {
doWorkOnQueue(interval, false)
doWorkOnQueue(interval, false);
}
return {
cancelFrame: (reason?: string) => {
taskCancelCallbacks.forEach((cancelMe) => cancelMe());
abort.abort(new DOMException(reason, 'AbortError'));
clearInterval(interval);
reportStatus({ status: 'cancelled' }, true);
}
},
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/scatterbrain/src/abstract/render-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class RenderServer {
// this is a good thing for performance, but potentially confusing - so we do our book-keeping before we actually start rendering:
const aboutToStart = this.clients.get(client); // this is the record we just put into the clients map - TS just wants to be sure it really exists:
if (aboutToStart) {
aboutToStart.frame = renderFn(image, this.cache, hijack)
aboutToStart.frame = renderFn(image, this.cache, hijack);
}
}
}
Expand Down

0 comments on commit b4fdefa

Please sign in to comment.