1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

fix: remove 'else'

This commit is contained in:
An Hongpeng 2021-04-18 21:32:40 +08:00 committed by GitHub
parent 3929f4f211
commit e9fd28bf64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,9 +209,8 @@ Obj.prototype[Symbol.iterator] = function() {
var value = current.value;
current = current.next;
return { done: false, value: value };
} else {
return { done: true };
}
return { done: true };
}
return iterator;
}
@ -245,9 +244,8 @@ let obj = {
value: self.data[index++],
done: false
};
} else {
return { value: undefined, done: true };
}
return { value: undefined, done: true };
}
};
}