Jason Quense 47e05d70f3 Fixed issue with non-simple property paths in object-rest-spread loose mode (#8514)
* fix: object rest with default values bug

fixes #8323

* rename variable
2018-08-23 15:53:31 +02:00

17 lines
516 B
JavaScript

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
const get = () => {
fireTheMissiles();
return 3;
};
const f = (_ref) => {
let {
a = get(),
b
} = _ref,
z = _objectWithoutPropertiesLoose(_ref, ["a", "b", "c"]);
const v = b + 3;
};