fix: 🐛
This commit is contained in:
parent
1a58e54ed0
commit
8655fd1840
2 changed files with 12 additions and 6 deletions
|
|
@ -11,6 +11,12 @@ class ModalManagerService {
|
|||
}
|
||||
|
||||
register(id: string, cb: () => void) {
|
||||
const modal = this.modals.find((m) => m.id === id)
|
||||
if (modal) {
|
||||
// already registered, update callback
|
||||
modal.cb = cb
|
||||
return
|
||||
}
|
||||
this.modals.push({ id, cb })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue