fix: Object.getOwnPropertySymbols called on non-object (#10902)

* fix: Object.getOwnPropertySymbols called on non-object

* convert Object
This commit is contained in:
Tsubasa Nakayama
2019-12-22 08:16:51 +09:00
committed by Nicolò Ribaudo
parent c5cfc83182
commit 416ce35638

View File

@@ -396,8 +396,8 @@ helpers.objectSpread = helper("7.0.0-beta.0")`
export default function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = (arguments[i] != null) ? arguments[i] : {};
var ownKeys = Object.keys(Object(source));
var source = (arguments[i] != null) ? Object(arguments[i]) : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;