8000 Merge pull request #2061 from pespantelis/dev · Hsinwe/vue@aff86c7 · GitHub
[go: up one dir, main page]

Skip to content

Commit aff86c7

Browse files
committed
Merge pull request vuejs#2061 from pespantelis/dev
[fix] Convert string to number
2 parents a7c1689 + f3b8f23 commit aff86c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/observer/array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def(
6262
'$set',
6363
function $set (index, val) {
6464
if (index >= this.length) {
65-
this.length = index + 1
65+
this.length = Number(index) + 1
6666
}
6767
return this.splice(index, 1, val)[0]
6868
}

0 commit comments

Comments
 (0)
0