From 39cb9f105f380ffebaa29f0960a3fab62654ef97 Mon Sep 17 00:00:00 2001 From: Isaac Janzen <50783505+janzenisaac@users.noreply.github.com> Date: Tue, 19 Apr 2022 13:41:18 -0500 Subject: [PATCH] Wait to display notice on topic timer (#16509) --- .../javascripts/discourse/app/components/topic-timer-info.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/topic-timer-info.js b/app/assets/javascripts/discourse/app/components/topic-timer-info.js index 1589a8dd24e..8e6910ddda0 100644 --- a/app/assets/javascripts/discourse/app/components/topic-timer-info.js +++ b/app/assets/javascripts/discourse/app/components/topic-timer-info.js @@ -75,6 +75,11 @@ export default Component.extend({ const duration = moment.duration(statusUpdateAt - moment()); const minutesLeft = duration.asMinutes(); if (minutesLeft > 0 || isDeleteRepliesType || this.basedOnLastPost) { + // We don't want to display a notice before a topic timer time has been set + if (!this.executeAt) { + return; + } + let durationMinutes = parseInt(this.durationMinutes, 10) || 0; let options = {