We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b7bfe1 commit 7cab529Copy full SHA for 7cab529
src/directives/public/for.js
@@ -526,7 +526,7 @@ const vFor = {
526
}
527
return res
528
} else {
529
- if (typeof value === 'number') {
+ if (typeof value === 'number' && !isNaN(value)) {
530
value = range(value)
531
532
return value || []
@@ -609,7 +609,7 @@ function findVmFromFrag (frag) {
609
610
function range (n) {
611
var i = -1
612
- var ret = new Array(n)
+ var ret = new Array(Math.floor(n))
613
while (++i < n) {
614
ret[i] = i
615
0 commit comments