From 9df8a85aa7a9c09f9a80acd8a13459fbb9f5c999 Mon Sep 17 00:00:00 2001 From: Nick Etson Date: Fri, 26 Apr 2019 17:04:27 -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 issues https://github.com/zloirock/core-js/issues/494 https://github.com/zloirock/core-js/issues/513 --- 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