mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
14 lines
250 B
JavaScript
14 lines
250 B
JavaScript
|
const modals = {};
|
||
|
|
||
|
export function addModal (instance) {
|
||
|
if (instance === null) {
|
||
|
// Modal was unmounted
|
||
|
return
|
||
|
}
|
||
|
modals[instance.constructor.name] = instance;
|
||
|
}
|
||
|
|
||
|
export function getModal (modalCls) {
|
||
|
return modals[modalCls.name];
|
||
|
}
|