Skip to content

Commit

Permalink
v0.3.4 patch requestIdleCallback for Safari compat
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonwocky committed Feb 23, 2022
1 parent 9298558 commit c07e52f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.3.4 (2022-02-23)

## Fixed

- Replaced `requestIdleCallback` with `setTimeout` for Safari support.

## v0.3.3 (2022-01-30)

## Added
Expand Down
2 changes: 1 addition & 1 deletion client/dom/triggers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const search = async ($: SearchComponent, index: Result[]) => {
render(constructSection(section, grouped[section], query)),
);
// prevent thread blocking
await new Promise((res, _rej) => requestIdleCallback(res));
await new Promise((res, _rej) => setTimeout(res, 0));
if ($input.value !== query) return grouped;
}
$results.innerHTML = "";
Expand Down
Loading

0 comments on commit c07e52f

Please sign in to comment.