mirror of https://github.com/zulip/zulip.git
stream_data: Use yield*.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
8df9828ed1
commit
6632eca2dc
|
@ -53,12 +53,8 @@ class BinaryDict {
|
|||
}
|
||||
|
||||
*values() {
|
||||
for (const value of this.trues.values()) {
|
||||
yield value;
|
||||
}
|
||||
for (const value of this.falses.values()) {
|
||||
yield value;
|
||||
}
|
||||
yield* this.trues.values();
|
||||
yield* this.falses.values();
|
||||
}
|
||||
|
||||
get(k) {
|
||||
|
|
|
@ -266,11 +266,7 @@ function FakeElement(selector, opts) {
|
|||
f.call(child);
|
||||
}
|
||||
};
|
||||
$self[Symbol.iterator] = function* () {
|
||||
for (const child of opts.children) {
|
||||
yield child;
|
||||
}
|
||||
};
|
||||
$self[Symbol.iterator] = () => opts.children.values();
|
||||
|
||||
for (const [i, child] of opts.children.entries()) {
|
||||
$self[i] = child;
|
||||
|
|
Loading…
Reference in New Issue