Skip to content

Commit

Permalink
Merge pull request #652 from SUI-Components/fix/script-loader-timeout
Browse files Browse the repository at this point in the history
fix(components/script/loader): onTimeout callback is executed on Scri…
  • Loading branch information
ivanmlaborda committed Apr 16, 2024
2 parents 6146ad6 + 31c56b5 commit 209e9c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/script/loader/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ScriptLoader = ({
.catch(() => seTimeout(true))
}

useEffect(() => onTimeout(), [onTimeout, timeout])
useEffect(() => timeout && onTimeout(), [onTimeout, timeout])
useMount(initLoad)

if (readyToRender && render) return render()
Expand Down

0 comments on commit 209e9c5

Please sign in to comment.