fix(dbdoc manager access working again ): update

This commit is contained in:
Philipp Kunz 2021-10-18 14:37:17 +02:00
parent d3a3d5be9d
commit c1b1af9c5d

View File

@ -83,7 +83,9 @@ export function Manager<TManager extends IManager>(managerArg?: TManager | TDela
}
public static get manager() {
let manager: TManager;
if (managerArg['db']) {
if (!managerArg) {
manager = this.prototype.defaultManager
} else if (managerArg['db']) {
manager = managerArg as TManager;
} else {
manager = (managerArg as TDelayed<TManager>)();
@ -92,7 +94,9 @@ export function Manager<TManager extends IManager>(managerArg?: TManager | TDela
}
public get manager() {
let manager: TManager;
if (managerArg['db']) {
if (!managerArg) {
manager = this.defaultManager
} else if (managerArg['db']) {
manager = managerArg as TManager;
} else {
manager = (managerArg as TDelayed<TManager>)();