Eliminate redundant "for" in trigger description (#13669)

This commit is contained in:
krazos 2022-09-12 05:57:53 -04:00 committed by GitHub
parent d323ab6726
commit 47c0901df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,11 +143,11 @@ export const describeTrigger = (
if ("for" in trigger) { if ("for" in trigger) {
let duration: string; let duration: string;
if (typeof trigger.for === "number") { if (typeof trigger.for === "number") {
duration = `for ${secondsToDuration(trigger.for)!}`; duration = `${secondsToDuration(trigger.for)!}`;
} else if (typeof trigger.for === "string") { } else if (typeof trigger.for === "string") {
duration = `for ${trigger.for}`; duration = `${trigger.for}`;
} else { } else {
duration = `for ${JSON.stringify(trigger.for)}`; duration = `${JSON.stringify(trigger.for)}`;
} }
base += ` for ${duration}`; base += ` for ${duration}`;