Skip to content

Commit 3474706

Browse files
committed
copy fix in <style> precedence error
1 parent 3770c11 commit 3474706

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Diff for: packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -3137,10 +3137,9 @@ export function isHostHoistableType(
31373137
console.error(
31383138
'Cannot render a <style> outside the main document without knowing its precedence and a unique href key.' +
31393139
' React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that' +
3140-
' does not conflic with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. ' +
3140+
' does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. ' +
31413141
' Note that hoisting <style> tags is considered an advanced feature that most will not use directly.' +
3142-
' Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`, or move the <style>' +
3143-
' to the <style> tag.',
3142+
' Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.',
31443143
);
31453144
}
31463145
}

Diff for: packages/react-dom/src/__tests__/ReactDOMFloat-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ describe('ReactDOMFloat', () => {
551551
);
552552
await waitForAll([]);
553553
}).toErrorDev([
554-
'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflic with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`, or move the <style> to the <style> tag.',
554+
'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.',
555555
'In HTML, <style> cannot be a child of <html>.',
556556
]);
557557

0 commit comments

Comments
 (0)