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.
2 parents aed6625 + 125b655 commit 09d2685Copy full SHA for 09d2685
src/directives/public/for.js
@@ -122,9 +122,9 @@ module.exports = {
122
if (key) {
123
frag.scope.$key = key
124
}
125
- // update interator
+ // update iterator
126
if (iterator) {
127
- frag.scope[iterator] = key || i
+ frag.scope[iterator] = key !== null ? key : i
128
129
// update data for track-by, object repeat &
130
// primitive values.
@@ -218,7 +218,7 @@ module.exports = {
218
_.define(scope, '$key', null)
219
220
if (this.iterator) {
221
- _.defineReactive(scope, this.iterator, key || index)
+ _.defineReactive(scope, this.iterator, key !== null ? key : index)
222
223
var frag = this.factory.create(host, scope, this._frag)
224
frag.forId = this.id
0 commit comments