Explicitly parse redirects in the editor.

This commit is contained in:
Bauke 2022-10-27 21:30:43 +02:00
parent fd5cbb6a6f
commit 9ee0d2db90
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 8 additions and 1 deletions

View File

@ -74,7 +74,14 @@ export default class Editor extends Component<Props, State> {
};
parseRedirect = (): Redirect => {
const redirect = parseRedirect(this.state);
const redirect = parseRedirect({
enabled: this.state.enabled,
id: this.state.id,
matcherType: this.state.matcherType,
matcherValue: this.state.matcherValue,
redirectType: this.state.redirectType,
redirectValue: this.state.redirectValue,
});
if (redirect === undefined) {
throw new Error('Failed to parse redirect');
}