actionsheet unit test
This commit is contained in:
@@ -2,7 +2,7 @@ import merge from 'src/utils/merge';
|
||||
|
||||
let context;
|
||||
if (window && window.popupContext) {
|
||||
context = window.popupContext
|
||||
context = window.popupContext;
|
||||
}
|
||||
|
||||
const DEFAULT_CONTEXT = {
|
||||
@@ -11,7 +11,7 @@ const DEFAULT_CONTEXT = {
|
||||
hasModal: false,
|
||||
instances: {},
|
||||
modalStack: []
|
||||
}
|
||||
};
|
||||
|
||||
context = window.popupContext = merge({}, DEFAULT_CONTEXT, context);
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ const PopupManager = {
|
||||
|
||||
register(id, instance) {
|
||||
if (id && instance) {
|
||||
let instances = PopupContext.getContext('instances');
|
||||
const instances = PopupContext.getContext('instances');
|
||||
instances[id] = instance;
|
||||
}
|
||||
},
|
||||
|
||||
deregister(id) {
|
||||
if (id) {
|
||||
let instances = PopupContext.getContext('instances');
|
||||
const instances = PopupContext.getContext('instances');
|
||||
instances[id] = null;
|
||||
delete instances[id];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user