Skip to content

Commit 5e7e9f9

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

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ describe('ReactDOMFloat', () => {
282282
return children.length === 0
283283
? undefined
284284
: children.length === 1
285-
? children[0]
286-
: children;
285+
? children[0]
286+
: children;
287287
}
288288

289289
function BlockedOn({value, children}) {
@@ -551,8 +551,8 @@ 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.',
555-
'In HTML, <style> cannot be a child of <html>.',
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"`.',
555+
'In HTML, <style> cannot be a child of <html>',
556556
]);
557557

558558
await expect(async () => {

0 commit comments

Comments
 (0)