[x] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe
Tell about your platform
Vue.js version : 3.2.25
Browser name and version : Chrome 106.0.5249.91-1
This package version : 5.0.3
Current behavior
I want to use vue-loading-overlay in router navigation.And I use composition API, but I get "vue-loading.min.js:1 Uncaught TypeError: Cannot read properties of null (reading 'parentElement')" in browser console every time router navigates.
my router.js is looks like this.
import {createRouter, createWebHistory} from 'vue-router'
import {notify} from "@kyvg/vue3-notification";
import {myStore} from '@/store'
import {useLoading} from 'vue-loading-overlay'
const $loading = useLoading()
let loader = $loading.show({
container:null,
loader: 'bars',
color: '#3C83F6',
})
const routes = [...]
const router = createRouter({
history: createWebHistory(),
routes
})
router.beforeEach((to, from, next) => {}
router.afterEach((to, from) => {
loader.hide() // Uncaught TypeError: Cannot read properties of null (reading 'parentElement') at vue-loading.min.js:1:6240
})
Expected behavior
The router works fine except this error, the error seems doesn‘t matters. So how can I avoid it.
Minimal reproduction of the problem with instructions
I'm submitting a ... (check one with "x")
Tell about your platform
Current behavior
I want to use vue-loading-overlay in router navigation.And I use composition API, but I get "vue-loading.min.js:1 Uncaught TypeError: Cannot read properties of null (reading 'parentElement')" in browser console every time router navigates.
my router.js is looks like this.
Expected behavior
The router works fine except this error, the error seems doesn‘t matters. So how can I avoid it.
Minimal reproduction of the problem with instructions