1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-17 20:51:20 +02:00

Immutable check warning: Log concerned node

This commit is contained in:
Soreine
2016-10-27 16:06:42 +02:00
parent 4374eb9b33
commit 8e963c75a6
2 changed files with 3 additions and 3 deletions

View File

@@ -103,7 +103,7 @@ class Node extends React.Component {
if (!Immutable.is(props.node, this.props.node)) {
return true
} else {
warning('Encountered different references for identical node values in "shouldComponentUpdate". Check that you are preserving references')
warning('Encountered different references for identical node values in "shouldComponentUpdate". Check that you are preserving references for the following node:', props.node)
}
}

View File

@@ -9,13 +9,13 @@ const __DEV__ = (
* @param {String} message
*/
export default function warning(message) {
export default function warning(message, ...more) {
if (!__DEV__) {
return
}
if (typeof console !== 'undefined') {
console.error(`Warning: ${message}`) // eslint-disable-line no-console
console.error(`Warning: ${message}`, ...more) // eslint-disable-line no-console
}
try {