Skip to content

Commit

Permalink
fix: remove debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 11, 2024
1 parent e1e919d commit f05143b
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions packages/devtools/src/runtime/plugins/view/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,29 +126,23 @@ export async function setupDevToolsClient({
const runtimeConfig = useRuntimeConfig()
const CLIENT_PATH = `${runtimeConfig.app.baseURL}/__nuxt_devtools__/client`.replace(/\/+/g, '/')
const initialUrl = CLIENT_PATH + state.value.route
try {
iframe = document.createElement('iframe')
iframe = document.createElement('iframe')

// custom iframe props
Object.fromEntries(runtimeConfig.app.devtools?.iframeProps || {})
for (const [key, value] of Object.entries(runtimeConfig.app.devtools?.iframeProps || {}))
iframe.setAttribute(key, String(value))
// custom iframe props
for (const [key, value] of Object.entries(runtimeConfig.app.devtools?.iframeProps || {}))
iframe.setAttribute(key, String(value))

iframe.id = 'nuxt-devtools-iframe'
iframe.src = initialUrl
iframe.onload = async () => {
try {
await waitForClientInjection()
client.syncClient()
}
catch (e) {
console.error('Nuxt DevTools client injection failed')
console.error(e)
}
iframe.id = 'nuxt-devtools-iframe'
iframe.src = initialUrl
iframe.onload = async () => {
try {
await waitForClientInjection()
client.syncClient()
}
catch (e) {
console.error('Nuxt DevTools client injection failed')
console.error(e)
}
}
catch (e) {
console.error(e)
}
}

Expand Down

0 comments on commit f05143b

Please sign in to comment.