From 6f07d3ca4192d970a6b38fa3e3132d80952c4685 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 7 Sep 2023 14:14:05 -0700 Subject: [PATCH] [Fix] Object.hasOwn does not exist in node 14 --- lib/core/imports/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/core/imports/index.js b/lib/core/imports/index.js index f88ac876fa..63622d7636 100644 --- a/lib/core/imports/index.js +++ b/lib/core/imports/index.js @@ -7,6 +7,11 @@ import Color from 'colorjs.io'; import es6promise from 'es6-promise'; import { Uint32Array } from 'typedarray'; import 'weakmap-polyfill'; +import hasOwn from 'core-js-pure/actual/object/has-own'; + +if (!('hasOwn' in Object)) { + Object.hasOwn = hasOwn; +} // prevent striping newline characters from strings (e.g. failure // summaries). value must be synced with build/configure.js