We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1a1368 commit aadafdbCopy full SHA for aadafdb
src/components/ModalContainer.vue
@@ -16,11 +16,13 @@
16
import {ref, markRaw} from 'vue';
17
import type {Modal, PromiseResolve, PromiseReject} from '../types/modal';
18
import type {AddModalProxyParams, CloseModalProxyParams} from '../types/modal-proxy';
19
+import {err} from '../utils';
20
21
const id = ref<number>(0);
22
const modals = ref<Modal[]>([]);
23
24
const addModal = ({key, component, props = {}}: AddModalProxyParams) => {
25
+ if (!component) err('Invalid component was passed.');
26
return new Promise((resolve, reject) => {
27
modals.value.push({
28
key,
0 commit comments