From 0edfe231dcacc68ffb56dbdfac6b0fcf7109fcc7 Mon Sep 17 00:00:00 2001 From: Nick Etson Date: Thu, 25 Apr 2019 14:35:44 -0400 Subject: [PATCH] Adds workaround for rollup treeshaking issue rollup treeshaking is removing the Object.getOwnPropertyNames FAILS_ON_PRIMITIVES feature test. This is related to these rollup issue https://github.com/rollup/rollup/issues/1771 https://github.com/rollup/rollup/issues/2790 Related issue and fix https://github.com/zloirock/core-js/issues/513 https://github.com/zloirock/core-js/commit/f813c4e3d436e56b6d3f28446e47219e8dcbdaae --- packages/core-js/modules/es.object.get-own-property-names.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core-js/modules/es.object.get-own-property-names.js b/packages/core-js/modules/es.object.get-own-property-names.js index becf6e596c50..5f05526da650 100644 --- a/packages/core-js/modules/es.object.get-own-property-names.js +++ b/packages/core-js/modules/es.object.get-own-property-names.js @@ -1,5 +1,5 @@ var nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names-external').f; -var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { Object.getOwnPropertyNames(1); }); +var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { return !Object.getOwnPropertyNames(1); }); // `Object.getOwnPropertyNames` method // https://tc39.github.io/ecma262/#sec-object.getownpropertynames