-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(useScript): variable scope bug that stops scripts being unmounted (…
…#103) * fix(useScript): variable scope bug that stops scripts being unmounted * Add changeset * Update .changeset/blue-swans-kick.md * fix(useScript): update attributes on existing script tag, fix tests to check all scripts present in head * test(useScript): test unmounting removed script element * fix(useScript): make sure script is always defined before setting attributes --------- Co-authored-by: Jovi De Croock <[email protected]>
- Loading branch information
1 parent
0106fef
commit 070924b
Showing
3 changed files
with
208 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"hoofd": patch | ||
--- | ||
|
||
Correct variable scoping in the `useEffect` of `useScript`, this prevents scripts from being wrongly unmounted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters