diff client/src/application/Topbar.vue @ 1044:f8a4ec146d47

fixed Vue reactivity issue (splitscreen button)
author Markus Kottlaender <markus@intevation.de>
date Thu, 25 Oct 2018 10:22:30 +0200
parents 740679d6682f
children 2cbc905ff0e9
line wrap: on
line diff
--- a/client/src/application/Topbar.vue	Thu Oct 25 08:05:06 2018 +0200
+++ b/client/src/application/Topbar.vue	Thu Oct 25 10:22:30 2018 +0200
@@ -18,7 +18,7 @@
                 </ul>
             </div>
         </div>
-        <div v-if="routeName == 'mainview' && currentProfile.length" class="splitbutton">
+        <div v-if="routeName == 'mainview' && Object.keys(currentProfile).length" class="splitbutton">
             <i @click="splitScreen" class="ui-element splitscreen fa fa-window-restore shadow"></i>
         </div>
         <div class="">
@@ -236,7 +236,7 @@
       this.$store.commit("application/toggleSidebar");
     },
     splitScreen() {
-      if (this.currentProfile.length == 0) return;
+      if (Object.keys(this.currentProfile).length == 0) return;
       this.$store.commit("application/toggleSplitScreen");
     }
   }