|
@@ -40,8 +40,9 @@ function* eachFormElementInTree (form) {
|
|
|
for (let value of form[tag]) {
|
|
|
let shouldCancel = false;
|
|
|
const cancel = () => shouldCancel = true;
|
|
|
- yield {tag, value, cancel};
|
|
|
- if (DIVE_TAGS[tag] && !shouldCancel) yield* eachFormElementInTree(value);
|
|
|
+ const dive = () => eachFormElementInTree(value);
|
|
|
+ yield {tag, value, cancel, dive};
|
|
|
+ if (DIVE_TAGS[tag] && !shouldCancel) yield* dive();
|
|
|
}
|
|
|
}
|
|
|
}
|