This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(helmet): fixes race condition with react-helmet (#534)
Co-authored-by: Jonny Adshead <JAdshead@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
32 additions
and
19 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 |
---|---|---|
@@ -1,29 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`moveHelmetScripts should only move scripts that were injected by react-helmet, ignoring others: helmet scripts 1`] = ` | ||
exports[`moveHelmetScripts should only move scripts that were injected by react-helmet, ignoring others: non-helmet scripts 1`] = ` | ||
NodeList [ | ||
<script | ||
data-react-helmet="true" | ||
src="hello.js" | ||
/>, | ||
<script | ||
data-react-helmet="true" | ||
src="world.js" | ||
src="foo.js" | ||
/>, | ||
<script | ||
data-react-helmet="true" | ||
src="baz.js" | ||
src="bar.js" | ||
/>, | ||
] | ||
`; | ||
|
||
exports[`moveHelmetScripts should only move scripts that were injected by react-helmet, ignoring others: non-helmet scripts 1`] = ` | ||
NodeList [ | ||
<script | ||
src="foo.js" | ||
/>, | ||
exports[`moveHelmetScripts should remove helmet scripts from the body and only append helmet scripts to the head if react-helmet has not already injected them: head helmet scripts 1`] = ` | ||
Array [ | ||
<script | ||
src="bar.js" | ||
data-react-helmet="true" | ||
src="hello.js" | ||
/>, | ||
] | ||
`; |
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