Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(matchobject): collect nested Output-s
  • Loading branch information
brigand committed Dec 27, 2019
1 parent 5779324 commit 0858213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cond/MatchObject.js
Expand Up @@ -38,7 +38,9 @@ class MatchObject extends Condition {
for (const [key, condition] of this.pairs) {
const match = condition.exec(object[key]);
if (match) {
if (condition instanceof Output) {
if (condition instanceof MatchObject) {
outputs.push(...match.slice(1));
} else if (condition instanceof Output) {
outputs.push(match[0]);
}
} else {
Expand Down

0 comments on commit 0858213

Please sign in to comment.