Skip to content

Commit

Permalink
Nits
Browse files Browse the repository at this point in the history
  • Loading branch information
acdlite committed Jan 17, 2019
1 parent 62e1048 commit c7d8ebc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react-dom/src/server/ReactPartialRendererHooks.js
Expand Up @@ -93,7 +93,7 @@ function areHookInputsEqual(
);
}
}
for (let i = 0; i < nextDeps.length; i++) {
for (let i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
if (is(nextDeps[i], prevDeps[i])) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberHooks.js
Expand Up @@ -161,7 +161,7 @@ function areHookInputsEqual(
);
}
}
for (let i = 0; i < nextDeps.length; i++) {
for (let i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
if (is(nextDeps[i], prevDeps[i])) {
continue;
}
Expand Down
Expand Up @@ -453,7 +453,6 @@ describe('ReactHooks', () => {
'Previous: [A, B]\n' +
'Incoming: [A]\n',
]);
expect(ReactTestRenderer).toHaveYielded(['Did commit: A, B']);
});

it('warns if switching from dependencies to no dependencies', () => {
Expand Down

0 comments on commit c7d8ebc

Please sign in to comment.