File tree Expand file tree Collapse file tree 1 file changed +14
-20
lines changed
packages/devtools/src/runtime/plugins/view Expand file tree Collapse file tree 1 file changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -126,29 +126,23 @@ export async function setupDevToolsClient({
126
126
const runtimeConfig = useRuntimeConfig ( )
127
127
const CLIENT_PATH = `${ runtimeConfig . app . baseURL } /__nuxt_devtools__/client` . replace ( / \/ + / g, '/' )
128
128
const initialUrl = CLIENT_PATH + state . value . route
129
- try {
130
- iframe = document . createElement ( 'iframe' )
129
+ iframe = document . createElement ( 'iframe' )
131
130
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 ) )
136
134
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 )
148
145
}
149
- }
150
- catch ( e ) {
151
- console . error ( e )
152
146
}
153
147
}
154
148
You can’t perform that action at this time.
0 commit comments