diff --git a/src/shared/index.js b/src/shared/index.js index 066942f1a6..9a26948db1 100644 --- a/src/shared/index.js +++ b/src/shared/index.js @@ -138,8 +138,16 @@ export function setDev(newState) { this._debugName + '.set was called without an object of data key-values to update.' ); } - + this._checkReadOnly(newState); + + Object.keys(newState).forEach(prop => { + if (prop in this._state && typeof this._state[prop] !== 'undefined' + && typeof this._state[prop] !== typeof newState[prop]) { + console.warn('Type of data property "' + prop + '" not match with previous one.'); + } + }); + set.call(this, newState); }