]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
fix(devtools): add all stores
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 4 May 2021 19:12:49 +0000 (21:12 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 4 May 2021 19:12:49 +0000 (21:12 +0200)
Fix #472

src/devtools.ts

index 68da5c5af366881792ca91d06694f77f21d33f65..3fb2fe004c8341c468c6b5652fea6105a8237662 100644 (file)
@@ -61,18 +61,18 @@ export function addDevtools(app: App, store: GenericStore) {
       const mutationsLayerId = 'pinia:mutations'
       const piniaInspectorId = 'pinia'
 
-      if (!isAlreadyInstalled) {
-        api.on.inspectComponent((payload, ctx) => {
-          if (payload.instanceData) {
-            payload.instanceData.state.push({
-              type: '🍍 ' + store.$id,
-              key: 'state',
-              editable: false,
-              value: store.$state,
-            })
-          }
-        })
+      api.on.inspectComponent((payload, ctx) => {
+        if (payload.instanceData) {
+          payload.instanceData.state.push({
+            type: '🍍 ' + store.$id,
+            key: 'state',
+            editable: false,
+            value: store.$state,
+          })
+        }
+      })
 
+      if (!isAlreadyInstalled) {
         api.addTimelineLayer({
           id: mutationsLayerId,
           label: `Pinia 🍍`,