File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/vue-query-devtools/src Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,15 @@ watchEffect(() => {
3131 devtools .setTheme (props .theme || ' system' )
3232})
3333
34+ let mounted = false
35+
3436onMounted (() => {
3537 devtools .mount (div .value as HTMLElement )
38+ mounted = true
3639})
3740
3841onScopeDispose (() => {
39- devtools .unmount ()
42+ if ( mounted ) devtools .unmount ()
4043})
4144 </script >
4245
Original file line number Diff line number Diff line change @@ -36,12 +36,15 @@ watchEffect(() => {
3636 devtools .setTheme (props .theme )
3737})
3838
39+ let mounted = false
40+
3941onMounted (() => {
4042 devtools .mount (div .value as HTMLElement )
43+ mounted = true
4144})
4245
4346onScopeDispose (() => {
44- devtools .unmount ()
47+ if ( mounted ) devtools .unmount ()
4548})
4649 </script >
4750
You can’t perform that action at this time.
0 commit comments