Skip to content

Commit

Permalink
fix: isFunctionshouldn't be used (#3233)
Browse files Browse the repository at this point in the history
  • Loading branch information
anderlaw committed Dec 22, 2021
1 parent 075585c commit 2d70798
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/late-elephants-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mobx": patch
---

`eq.ts` fix comparer logic
2 changes: 1 addition & 1 deletion packages/mobx/src/utils/eq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function eq(a: any, b: any, depth: number, aStack?: any[], bStack?: any[]) {
if (a !== a) return b !== b
// Exhaust primitive checks
const type = typeof a
if (!isFunction(type) && type !== "object" && typeof b != "object") return false
if (type !== "function" && type !== "object" && typeof b != "object") return false

// Compare `[[Class]]` names.
const className = toString.call(a)
Expand Down

0 comments on commit 2d70798

Please sign in to comment.