Jenesius / vue-modal

🖖The progressive and simple modal system for Vue.js v3
https://modal.jenesius.com
MIT License
149 stars 14 forks source link

Uncaught (in promise) Error: Modal's queue is not empty. Probably some modal reject closing by onClose hook. #85

Closed billbravo99 closed 1 year ago

billbravo99 commented 1 year ago

Describe the bug why i get the error in console

image

Please complete the following information:

this is my router:

image image
Jenesius commented 1 year ago

Hi, Do you have the work repo where I can test this problem on my pc?

Jenesius commented 1 year ago

@billbravo99 , To solve this problem, I need a little more information than is available. Ideally, a repository with this disease. If this option is not possible, specify the version of jenesius-vue-modal and also attach two files router.js and Login.vue.

About Error

This exception (error) is thrown only in one case: if using openModal failed to close previously opened modal windows. If we look at the implementation of this function, we will see the following check:

if (modalQueue.value.length) throw ModalError.QueueNoEmpty();

As a test, I suggest you look at what the value of modalQueue is. Fortunately, you can import it directly:

import {modalQueue} from "jenesius-vue-modal";

window.test = () => console.log(modalQueue.value)

And call it from the browser console.