File tree Expand file tree Collapse file tree
packages/react-devtools/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,14 +138,13 @@ export const TanStackDevtools = ({
138138 typeof plugin . name === 'string'
139139 ? plugin . name
140140 : ( e , theme ) => {
141- const target = e . ownerDocument . getElementById (
142- e . getAttribute ( 'id' ) ! ,
143- )
141+ const id = e . getAttribute ( 'id' ) !
142+ const target = e . ownerDocument . getElementById ( id )
144143
145144 if ( target ) {
146145 setTitleContainers ( ( prev ) => ( {
147146 ...prev ,
148- [ e . getAttribute ( 'id' ) as string ] : e ,
147+ [ id ] : e ,
149148 } ) )
150149 }
151150
@@ -157,14 +156,13 @@ export const TanStackDevtools = ({
157156 )
158157 } ,
159158 render : ( e , theme ) => {
160- const target = e . ownerDocument . getElementById (
161- e . getAttribute ( 'id' ) ! ,
162- )
159+ const id = e . getAttribute ( 'id' ) !
160+ const target = e . ownerDocument . getElementById ( id )
163161
164162 if ( target ) {
165163 setPluginContainers ( ( prev ) => ( {
166164 ...prev ,
167- [ e . getAttribute ( 'id' ) as string ] : e ,
165+ [ id ] : e ,
168166 } ) )
169167 }
170168
You can’t perform that action at this time.
0 commit comments