Skip to content

Commit

Permalink
ReactFiberHydrationWarning in react-reconciler: pretty attribute names
Browse files Browse the repository at this point in the history
Print the extra attribute names array nicer, with a space after comma.
The default array toString was used implicitly before.
  • Loading branch information
sompylasar committed Oct 26, 2018
1 parent 1720d3f commit cb284f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-dom/src/__tests__/ReactMount-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ describe('ReactMount', () => {
div,
),
).toWarnDev(
'Warning: Extra attributes from the server: data-ssr-extra-prop,data-ssr-extra-prop-2\n' +
'Warning: Extra attributes from the server: data-ssr-extra-prop, data-ssr-extra-prop-2\n' +
' in div (at **)',
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ function warnForExtraAttributes(attributeNames: Set<string>) {
names.push(name);
});
// TODO: As we're here in the terminology of universal hydration, should we stop saying 'from the server'?
warning(false, 'Extra attributes from the server: %s', names);
warning(false, 'Extra attributes from the server: %s', names.join(', '));
}

function warnForDeletedHydratableInstance(
Expand Down

0 comments on commit cb284f6

Please sign in to comment.