Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6203e2a

Browse filesBrowse files
authored
FIX: support isPlainObj with constructor keys (immutable-js#1627)
Specifically look for a function instead of any value Closes immutable-js#1623
1 parent 2f8570d commit 6203e2a
Copy full SHA for 6203e2a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/utils/isPlainObj.js

Copy file name to clipboardExpand all lines: src/utils/isPlainObj.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
export default function isPlainObj(value) {
99
return (
1010
value &&
11-
((value.constructor && value.constructor.name === 'Object') ||
12-
value.constructor === undefined)
11+
(typeof value.constructor !== 'function' ||
12+
value.constructor.name === 'Object')
1313
);
1414
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.