File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/devtools/src/components Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @tanstack/devtools ' : patch
3+ ---
4+
5+ fixed an issue where SourceInspector was not working when the app is served to a subpath
Original file line number Diff line number Diff line change @@ -78,11 +78,15 @@ export const SourceInspector = () => {
7878 e . preventDefault ( )
7979 e . stopPropagation ( )
8080
81- fetch (
82- `${ location . origin } /__tsd/open-source?source=${ encodeURIComponent (
81+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
82+ const baseUrl = new URL ( import . meta. env ?. BASE_URL ?? '/' , location . origin )
83+ const url = new URL (
84+ `__tsd/open-source?source=${ encodeURIComponent (
8385 highlightState . dataSource ,
8486 ) } `,
85- ) . catch ( ( ) => { } )
87+ baseUrl ,
88+ )
89+ fetch ( url ) . catch ( ( ) => { } )
8690 } )
8791
8892 const currentElementBoxStyles = createMemo ( ( ) => {
You can’t perform that action at this time.
0 commit comments