Skip to content

Commit 9b39e59

Browse files
committed
refactor: self code review
1 parent b54ec63 commit 9b39e59

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/constructs/regex.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ export interface Regex extends RegexConstruct {
99
}
1010

1111
export function regex(sequence: RegexSequence): Regex {
12-
const children = ensureArray(sequence);
13-
if (children.length === 0) {
14-
throw new Error('`regex` should receive at least one element');
15-
}
16-
1712
return {
1813
type: 'sequence',
19-
children,
14+
children: ensureArray(sequence),
2015
encode: encodeRegex,
2116
};
2217
}

0 commit comments

Comments
 (0)