Prechádzať zdrojové kódy

fix(reactivity): update iterator to check for completion instead of value presence (#13761)

yangdan8 7 mesiacov pred
rodič
commit
2078f8b756

+ 1 - 1
packages/reactivity/src/arrayInstrumentations.ts

@@ -215,7 +215,7 @@ function iterator(
     iter._next = iter.next
     iter.next = () => {
       const result = iter._next()
-      if (result.value) {
+      if (!result.done) {
         result.value = wrapValue(result.value)
       }
       return result