mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
Fix access before initialization issue breaking JS tests
This commit is contained in:
parent
73a606f6ba
commit
2dc9c4ec57
@ -23,7 +23,7 @@ export interface EgwActionObjectInterface {
|
|||||||
//properties
|
//properties
|
||||||
id?:string
|
id?:string
|
||||||
_state: number;
|
_state: number;
|
||||||
handlers : { [type : string]? : [{ type : string, listener : Function }] };
|
handlers : { [type : string] : [{ type : string, listener : Function }] };
|
||||||
stateChangeCallback: Function;
|
stateChangeCallback: Function;
|
||||||
stateChangeContext: any;
|
stateChangeContext: any;
|
||||||
reconnectActionsCallback: Function;
|
reconnectActionsCallback: Function;
|
||||||
|
@ -388,21 +388,26 @@ export class egwDragAction extends EgwDragAction {
|
|||||||
};
|
};
|
||||||
})()
|
})()
|
||||||
|
|
||||||
let _dragActionImpl = null;
|
|
||||||
|
|
||||||
export function getDragImplementation() {
|
export function getDragImplementation() {
|
||||||
if (!_dragActionImpl) {
|
if(typeof window["_egwActionImpls"] != "object")
|
||||||
_dragActionImpl = new EgwDragActionImplementation();
|
{
|
||||||
|
window["_egwActionImpls"] = {};
|
||||||
}
|
}
|
||||||
return _dragActionImpl;
|
if(!window["_egwActionImpls"]._dragActionImpl)
|
||||||
|
{
|
||||||
|
window["_egwActionImpls"]._dragActionImpl = new EgwDragActionImplementation();
|
||||||
|
}
|
||||||
|
return window["_egwActionImpls"]._dragActionImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let _dropActionImpl = null;
|
|
||||||
|
|
||||||
export function getDropImplementation() {
|
export function getDropImplementation() {
|
||||||
if (!_dropActionImpl) {
|
if(typeof window["_egwActionImpls"] != "object")
|
||||||
_dropActionImpl = new egwDropActionImplementation();
|
{
|
||||||
|
window["_egwActionImpls"] = {};
|
||||||
}
|
}
|
||||||
return _dropActionImpl;
|
if(!window["_egwActionImpls"]._dropActionImpl)
|
||||||
|
{
|
||||||
|
window["_egwActionImpls"]._dropActionImpl = new egwDropActionImplementation();
|
||||||
|
}
|
||||||
|
return window["_egwActionImpls"]._dropActionImpl;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user