Skip to content

Commit c7b597b

Browse files
authored
fix: polyfill Object.hasOwn for node 14 (#4152)
1 parent a0882f6 commit c7b597b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/core/imports/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import Color from 'colorjs.io';
77
import es6promise from 'es6-promise';
88
import { Uint32Array } from 'typedarray';
99
import 'weakmap-polyfill';
10+
import hasOwn from 'core-js-pure/actual/object/has-own';
11+
12+
if (!('hasOwn' in Object)) {
13+
Object.hasOwn = hasOwn;
14+
}
1015

1116
// prevent striping newline characters from strings (e.g. failure
1217
// summaries). value must be synced with build/configure.js

0 commit comments

Comments
 (0)