Skip to content

Commit

Permalink
Fix edge tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath committed Jul 25, 2023
1 parent 7808ce7 commit ce72b71
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions __mocks__/lodash/isPlainObject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

// From https://github.com/sindresorhus/is-plain-obj/blob/v2.1.0/index.js
// As this one is more permissive and works on Edge runtime
module.exports = (value) => {
if (Object.prototype.toString.call(value) !== '[object Object]') {
return false;
}

const prototype = Object.getPrototypeOf(value);
return prototype === null || prototype === Object.prototype;
};

0 comments on commit ce72b71

Please sign in to comment.