Skip to content

Commit

Permalink
[Fix] Object.hasOwn does not exist in node 14
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 7, 2023
1 parent 54dacf6 commit 353c634
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/core/imports/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 353c634

Please sign in to comment.