Skip to content

Commit

Permalink
Updated triggerAsyncCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
salmenus committed Aug 8, 2024
1 parent 156cded commit c16ee89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {CallbackFunction} from '../../../types/callbackFunction';
const isHighPerfJsEngine = navigator?.userAgent?.includes('Safari');

// TODO: To be replaced with a pure React implementation for submitPrompt that relies on React rendering cycle
const defaultAsyncDelay: 1 | 10 = isHighPerfJsEngine ? 10 : 1; // Efficient async scheduling for Safari
const defaultAsyncDelay: 1 | 100 = isHighPerfJsEngine ? 100 : 1; // Efficient async scheduling for Safari

export const triggerAsyncCallback = (trigger: CallbackFunction, delay: number = defaultAsyncDelay) => {
setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion pipeline/npm/versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"inherit": true,
"nlux": "2.16.0",
"nlux": "2.16.1",
"peerDependencies": {
"react": "18",
"react-dom": "18"
Expand Down

0 comments on commit c16ee89

Please sign in to comment.