Skip to content

Commit f05143b

Browse files
committed
fix: remove debugging code
1 parent e1e919d commit f05143b

File tree

1 file changed

+14
-20
lines changed
  • packages/devtools/src/runtime/plugins/view

1 file changed

+14
-20
lines changed

packages/devtools/src/runtime/plugins/view/client.ts

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,29 +126,23 @@ export async function setupDevToolsClient({
126126
const runtimeConfig = useRuntimeConfig()
127127
const CLIENT_PATH = `${runtimeConfig.app.baseURL}/__nuxt_devtools__/client`.replace(/\/+/g, '/')
128128
const initialUrl = CLIENT_PATH + state.value.route
129-
try {
130-
iframe = document.createElement('iframe')
129+
iframe = document.createElement('iframe')
131130

132-
// custom iframe props
133-
Object.fromEntries(runtimeConfig.app.devtools?.iframeProps || {})
134-
for (const [key, value] of Object.entries(runtimeConfig.app.devtools?.iframeProps || {}))
135-
iframe.setAttribute(key, String(value))
131+
// custom iframe props
132+
for (const [key, value] of Object.entries(runtimeConfig.app.devtools?.iframeProps || {}))
133+
iframe.setAttribute(key, String(value))
136134

137-
iframe.id = 'nuxt-devtools-iframe'
138-
iframe.src = initialUrl
139-
iframe.onload = async () => {
140-
try {
141-
await waitForClientInjection()
142-
client.syncClient()
143-
}
144-
catch (e) {
145-
console.error('Nuxt DevTools client injection failed')
146-
console.error(e)
147-
}
135+
iframe.id = 'nuxt-devtools-iframe'
136+
iframe.src = initialUrl
137+
iframe.onload = async () => {
138+
try {
139+
await waitForClientInjection()
140+
client.syncClient()
141+
}
142+
catch (e) {
143+
console.error('Nuxt DevTools client injection failed')
144+
console.error(e)
148145
}
149-
}
150-
catch (e) {
151-
console.error(e)
152146
}
153147
}
154148

0 commit comments

Comments
 (0)