Bugfix: sieve undefined args[i-1]

This commit is contained in:
the-djmaze 2022-05-17 14:48:38 +02:00
parent e6ea47e75f
commit 882c0bde42
8 changed files with 17 additions and 17 deletions

View file

@ -77,9 +77,9 @@ export class VacationCommand extends ActionCommand
args.forEach((arg, i) => {
if (':mime' === arg) {
this.mime = true;
} else if (':addresses' === args[i-1]) {
} else if (i && ':addresses' === args[i-1]) {
this.addresses = arg; // GrammarStringList
} else if (':' === args[i-1][0]) {
} else if (i && ':' === args[i-1][0]) {
// :days, :seconds, :subject, :from, :handle
this[args[i-1].replace(':','_')].value = arg.value;
}