-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Hi there!
After and upgrade to latest version v1.0.18 I getting an
Uncaught TypeError: Cannot convert undefined or null to object
I did a roll back to v1.0.17 - and it works well.
Chrome devtools says that error is on var keys = Object.keys(data);
line:
/**
* Initialize the data.
*/
Vue.prototype._initData = function () {
var dataFn = this.$options.data;
var data = this._data = dataFn ? dataFn() : {};
var props = this._props;
var runtimeData = this._runtimeData ? typeof this._runtimeData === 'function' ? this._runtimeData() : this._runtimeData : null;
// proxy data on instance
var keys = Object.keys(data);
var i, key;
i = keys.length;
while (i--) {
key = keys[i];
// there are two scenarios where we can proxy a data key:
// 1. it's not already defined as a prop
// 2. it's provided via a instantiation option AND there are no
// template prop present
if (!props || !hasOwn(props, key) || runtimeData && hasOwn(runtimeData, key) && props[key].raw === null) {
this._proxy(key);
} else if (process.env.NODE_ENV !== 'production') {
warn('Data field "' + key + '" is already defined ' + 'as a prop. Use prop default value instead.');
}
}
// observe data
observe(data, this);
};
Here is a screenshot of the console: http://prntscr.com/ai19zx
Thank you!
Metadata
Metadata
Assignees
Labels
No labels