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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user