mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-03-04 18:53:42 +08:00
Fix some Sieve parser issues
This commit is contained in:
parent
62639acc5a
commit
f3935b1df4
3 changed files with 6 additions and 5 deletions
|
@ -18,9 +18,9 @@ import {
|
|||
*/
|
||||
export class ConditionalCommand extends ControlCommand
|
||||
{
|
||||
constructor()
|
||||
constructor(identifier)
|
||||
{
|
||||
super();
|
||||
super(identifier);
|
||||
this.test = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,8 @@ class FlagCommand extends ActionCommand
|
|||
|
||||
toString()
|
||||
{
|
||||
return this.identifier + ' ' + this._variablename + ' ' + this.list_of_flags + ';';
|
||||
let name = this._variablename;
|
||||
return this.identifier + (name.length ? ' ' + this.variablename : '') + ' ' + this.list_of_flags + ';';
|
||||
}
|
||||
|
||||
get variablename()
|
||||
|
|
|
@ -196,7 +196,7 @@ export class GrammarTestList extends Array
|
|||
// return '(\r\n\t' + arrayToString(this, ',\r\n\t') + '\r\n)';
|
||||
return '(' + this.join(', ') + ')';
|
||||
}
|
||||
return this.length ? this[0] : '';
|
||||
return this.length ? this[0].toString() : '';
|
||||
}
|
||||
|
||||
push(value)
|
||||
|
@ -254,7 +254,7 @@ export class GrammarStringList extends Array
|
|||
if (1 < this.length) {
|
||||
return '[' + this.join(',') + ']';
|
||||
}
|
||||
return this.length ? this[0] : '';
|
||||
return this.length ? this[0].toString() : '';
|
||||
}
|
||||
|
||||
push(value)
|
||||
|
|
Loading…
Reference in a new issue