-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object doesn't support property or method 'assign' #11
Comments
Try this pollyfill from MDN: if (typeof Object.assign != 'function') {
// Must be writable: true, enumerable: false, configurable: true
Object.defineProperty(Object, "assign", {
value: function assign(target, varArgs) { // .length of function is 2
'use strict';
if (target == null) { // TypeError if undefined or null
throw new TypeError('Cannot convert undefined or null to object');
}
var to = Object(target);
for (var index = 1; index < arguments.length; index++) {
var nextSource = arguments[index];
if (nextSource != null) { // Skip over if undefined or null
for (var nextKey in nextSource) {
// Avoid bugs when hasOwnProperty is shadowed
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
to[nextKey] = nextSource[nextKey];
}
}
}
}
return to;
},
writable: true,
configurable: true
});
} |
problem is , i have no idea where this code is. Just pasted it because thats where the error was thrown |
@riksnelders This code generated by webpack with target of 'ES5' for this part of code https://github.com/artemsky/vue-snotify/blob/master/src/util.js#L17 I'll try to do something with that in next release (soon) |
@riksnelders this polyfill should work with new release(in one day). |
Currently having the same issue under IE Edge. Something changed ? |
I still get this error on vue-snotify 3.0.4. |
I solve kind of question by adding {
test: /\.js$/,
loader: 'babel-loader',
include: [
resolve('src'),
resolve('test'),
resolve('node_modules/webpack-dev-server/client'),
resolve('node_modules/vue-snotify')
]
}, also, I used |
IE error thrown.
in this function
The text was updated successfully, but these errors were encountered: