Skip to content

Commit

Permalink
fix: next tick of editor
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdchan committed Jun 21, 2022
1 parent 3439c44 commit fccaa25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/blocky-core/src/view/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ export class EditorController {
emitNextTicks() {
const fns = this.#nextTick;
if (fns.length > 0) {
window.requestAnimationFrame(() => {
setTimeout(() => {
for (const fn of fns) {
try {
fn();
} catch (err) {
console.error(err);
}
}
});
}, 0);
}
this.#nextTick = [];
}
Expand Down

0 comments on commit fccaa25

Please sign in to comment.