Browse Source

fix: show scripts immediately

tophf 2 years ago
parent
commit
d924446564
1 changed files with 7 additions and 5 deletions
  1. 7 5
      src/options/views/tab-installed.vue

+ 7 - 5
src/options/views/tab-installed.vue

@@ -359,15 +359,17 @@ async function onHashChange() {
     if (script) {
       state.code = await sendCmdDirectly('GetScriptCode', id);
     } else {
+      // Strip the invalid id from the URL so |App| can render the aside,
+      // which was hidden to avoid flicker on initial page load directly into the editor.
+      if (id) setRoute(tab, true);
       // First time showing the list we need to tell v-if to keep it forever
       if (!state.canRenderScripts) {
-        await loadData();
         state.canRenderScripts = true;
+        renderScripts();
+        loadData();
+      } else {
+        debouncedRender();
       }
-      debouncedRender();
-      // Strip the invalid id from the URL so |App| can render the aside,
-      // which was hidden to avoid flicker on initial page load directly into the editor.
-      if (id) setRoute(tab, true);
     }
     state.script = script;
   }