Skip to content

Commit

Permalink
refactor(mark): update
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Dec 1, 2023
1 parent 37773d6 commit 56a4e9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/marker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { dataTypes } from '../constant';

const constructorString = Object.prototype.constructor.toString();
/**
* Check if the value is a simple object(No prototype chain object or iframe same-origin object),
* support case: https://github.com/unadlib/mutative/issues/17
Expand All @@ -14,8 +15,7 @@ const isSimpleObject = (value: unknown) => {
prototype.constructor;
return (
typeof constructor === 'function' &&
Function.toString.call(constructor) ===
Object.prototype.constructor.toString()
Function.toString.call(constructor) === constructorString
);
};

Expand Down

0 comments on commit 56a4e9a

Please sign in to comment.