Skip to content

Commit 84d27a1

Browse files
committed
clone value if it's null
1 parent 982f03c commit 84d27a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function decorator (Component) {
5656
}
5757

5858
function clone (val) {
59-
if (typeof val !== 'object') {
59+
if (val === null || typeof val !== 'object') {
6060
return val
6161
} else if (Array.isArray(val)) {
6262
return val.map(clone)

0 commit comments

Comments
 (0)