diff --git a/src/collections/vector.js b/src/collections/vector.js index c8c2df079..b11ec0092 100644 --- a/src/collections/vector.js +++ b/src/collections/vector.js @@ -94,14 +94,13 @@ export class Vector { } } - iter() { + [Symbol.iterator]() { return new VectorIterator(this) } toArray() { let ret = [] - let iterator = this.iter() - for (let v of iterator) { + for (let v of this) { ret.push(v) } return ret