FIX: Ensure software-update banner is only shown after 24 hours (#12634)

FIX: Ensure software-update banner is only shown after 24 hours (#12634)

isTesting is a function, so if(isTesting) was only checking for the presence of the function. We need to actually evaluate it. Followup to 68a032a7348dbf264f4d2db5f5dae5d0ecfdb7bd

diff --git a/app/assets/javascripts/discourse/app/components/software-update-prompt.js b/app/assets/javascripts/discourse/app/components/software-update-prompt.js
index 39831fc..0de3b1e 100644
--- a/app/assets/javascripts/discourse/app/components/software-update-prompt.js
+++ b/app/assets/javascripts/discourse/app/components/software-update-prompt.js
@@ -43,7 +43,7 @@ export default Component.extend({
       }
 
       if (!this._timeoutHandler && this.session.requiresRefresh) {
-        if (isTesting) {
+        if (isTesting()) {
           this.set("showPrompt", true);
         } else {
           // Since we can do this transparently for people browsing the forum

GitHub sha: 9c78bb26

2 Likes

This commit appears in #12634 which was approved by CvX. It was merged by davidtaylorhq.