Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9e1a20 commit 31cd208Copy full SHA for 31cd208
client/app.vue
@@ -11,6 +11,10 @@ const scriptSizes = reactive<Record<string, string>>({})
11
const scriptErrors = reactive<Record<string, string>>({})
12
13
function syncScripts(_scripts: any[]) {
14
+ if (!_scripts || typeof _scripts !== 'object') {
15
+ scripts.value = {}
16
+ return
17
+ }
18
// augment the scripts with registry
19
scripts.value = Object.fromEntries(
20
Object.entries({ ..._scripts })
@@ -59,7 +63,7 @@ onDevtoolsClientConnected(async (client) => {
59
63
syncScripts(ctx.scripts)
60
64
})
61
65
version.value = client.host.nuxt.$config.public['nuxt-scripts'].version
62
- syncScripts(client.host.nuxt._scripts)
66
+ syncScripts(client.host.nuxt._scripts || {})
67
68
const tab = ref('scripts')
69
0 commit comments