Skip to content

Commit

Permalink
use assign function
Browse files Browse the repository at this point in the history
  • Loading branch information
luruozhou committed Aug 20, 2018
1 parent 65fe9a8 commit e52f02f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.js
Expand Up @@ -69,7 +69,7 @@ const assign =

export function shallowCopy(value) {
if (Array.isArray(value)) {
return Object.assign([], value)
return assign([], value)
}
const target = value.__proto__ === undefined ? Object.create(null) : {}
return assign(target, value)
Expand Down

0 comments on commit e52f02f

Please sign in to comment.