Skip to content

Commit

Permalink
nit: merge isMap and isSet checks
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Apr 22, 2019
1 parent 5857d63 commit 4164f0d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ export function isDraftable(value) {
if (Array.isArray(value)) return true
const proto = Object.getPrototypeOf(value)
if (!proto || proto === Object.prototype) return true
if (isMap(value)) return true
if (isSet(value)) return true
if (isMap(value) || isSet(value)) return true
return !!value[DRAFTABLE] || !!value.constructor[DRAFTABLE]
}

Expand Down

0 comments on commit 4164f0d

Please sign in to comment.