Fix some issues with /settings
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
514815fb41
commit
0f7ecde996
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ public class TimeSpanOption : Option<TimeSpan> {
|
|||
public override Result Set(JsonNode settings, string from) {
|
||||
var task = Parser.TryParseAsync(from).AsTask().GetAwaiter().GetResult();
|
||||
|
||||
if (task.IsDefined(out var span))
|
||||
if (!task.IsDefined(out var span))
|
||||
return Result.FromError(new ArgumentInvalidError(nameof(from), Messages.InvalidSettingValue));
|
||||
|
||||
settings[Name] = span.ToString();
|
||||
|
|
Reference in a new issue