From 00e431e34022d41a44659acc7cc5a0bb1be24dc8 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 22 Jun 2023 17:08:17 -0400 Subject: [PATCH] footer: Correctly hide store buttons in apps showStoreButtons is meant to be true only if both the androidApplicationId and windowsApplicationId are defined. However the test was implemented as comparing them to empty string. When they are not defined, they take the value `undefined` which is not equal to empty string. As a result, the Google Play and Microsoft Store buttons are shown in the Android app (and probably also in the Windows app). Instead, use double-negation to treat both empty string and undefined as false, and a non-empty string as true. > !!undefined false > !!'' false > !!"org.endlessos.Key" true --- kolibri_explore_plugin/assets/src/components/AboutFooter.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolibri_explore_plugin/assets/src/components/AboutFooter.vue b/kolibri_explore_plugin/assets/src/components/AboutFooter.vue index d2e032ff5..4c3e34230 100644 --- a/kolibri_explore_plugin/assets/src/components/AboutFooter.vue +++ b/kolibri_explore_plugin/assets/src/components/AboutFooter.vue @@ -92,7 +92,7 @@ return plugin_data.windowsApplicationId; }, showStoreButtons() { - return plugin_data.androidApplicationId != '' && plugin_data.windowsApplicationId != ''; + return !!plugin_data.androidApplicationId && !!plugin_data.windowsApplicationId; }, }, $trs: {