Skip to content

Commit 032fd66

Browse files
committed
nits
1 parent a8dc53b commit 032fd66

File tree

4 files changed

+3
-33
lines changed

4 files changed

+3
-33
lines changed

packages/react-dom-bindings/src/client/ReactDOMFloatClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ export function hydrateHoistable(
843843
internalInstanceHandle: Object,
844844
): Instance {
845845
const ownerDocument = getDocumentFromRoot(hoistableRoot);
846-
const nodes = ownerDocument.querySelectorAll(type);
846+
const nodes = ownerDocument.getElementsByTagName(type);
847847

848848
const children = props.children;
849849
let child, childString;

packages/react-dom-bindings/src/shared/ReactDOMResourceValidation.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,6 @@
77
* @flow
88
*/
99

10-
import hasOwnProperty from 'shared/hasOwnProperty';
11-
12-
function getResourceNameForWarning(
13-
type: string,
14-
props: Object,
15-
implicit: boolean,
16-
) {
17-
if (__DEV__) {
18-
switch (type) {
19-
case 'style': {
20-
return 'style Resource';
21-
}
22-
case 'script': {
23-
return 'script Resource';
24-
}
25-
case 'preload': {
26-
if (implicit) {
27-
return `preload for a ${props.as} Resource`;
28-
}
29-
return `preload Resource (as "${props.as}")`;
30-
}
31-
}
32-
}
33-
return 'Resource';
34-
}
35-
3610
export function validateLinkPropsForStyleResource(props: any): boolean {
3711
if (__DEV__) {
3812
// This should only be called when we know we are opting into Resource semantics (i.e. precedence is not null)
@@ -220,7 +194,7 @@ type PropDifferences = {
220194
},
221195
},
222196
};
223-
export function compareResourcePropsForWarning(
197+
function compareResourcePropsForWarning(
224198
newProps: any,
225199
currentProps: any,
226200
): null | PropDifferences {

packages/react-dom/src/__tests__/ReactDOMComponent-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ describe('ReactDOMComponent', () => {
494494
'To fix this, either do not render the element at all ' +
495495
'or pass null to href instead of an empty string.',
496496
);
497-
console.log('container', container.outerHTML);
498497
const node = container.firstChild;
499498
expect(node.hasAttribute('href')).toBe(false);
500499

packages/react-reconciler/src/ReactFiberBeginWork.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,10 +1643,7 @@ function updateHostHoistable(
16431643
));
16441644
if (current === null) {
16451645
if (!getIsHydrating() && resource === null) {
1646-
// This is not a Resource Hoistable and we aren't hydrating so we construct the
1647-
// We we aren't hydrating and can potentially prepare the hoistable instance now during
1648-
// render. Note that in some Hosts not all Hoistables will be able to produce an
1649-
// instance during render and they may be constructed during acquisition in the commit phase
1646+
// This is not a Resource Hoistable and we aren't hydrating so we construct the instance.
16501647
workInProgress.stateNode = createHoistableInstance(
16511648
workInProgress.type,
16521649
workInProgress.pendingProps,

0 commit comments

Comments
 (0)