From 7a0c88df11e56b023969cfbfc01702bc3595bf9c Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 22 Jan 2020 01:02:27 +0100 Subject: [PATCH] Small fix with injection --- src/backend/Components/User/LoginManager.ts | 1 - src/backend/Injector/Injector.ts | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/Components/User/LoginManager.ts b/src/backend/Components/User/LoginManager.ts index ea325fb..2d5b4cb 100644 --- a/src/backend/Components/User/LoginManager.ts +++ b/src/backend/Components/User/LoginManager.ts @@ -110,7 +110,6 @@ implements FrontworkComponent{ initialize = async () => { this.exporters = [this.guild, this.item, this.raid, this.character] - //set up permissions await Promise.all( [this, ...this.exporters].flatMap(exp => exp.exportRPCFeatures().map(async (feature) => { diff --git a/src/backend/Injector/Injector.ts b/src/backend/Injector/Injector.ts index bd37954..e8de506 100644 --- a/src/backend/Injector/Injector.ts +++ b/src/backend/Injector/Injector.ts @@ -37,6 +37,13 @@ export const Injector = new class { this.moduleObjs[this.rootInterface.name] = rootobj this.moduleObjs[target.name] = rootobj + while(this.injectionQueue.length > 0){ + const i = this.injectionQueue.shift() + if(this.moduleObjs[i.what.name]) + i.target[i.where] = this.moduleObjs[i.what.name] + else + this.injectionQueue.push() + } this.injectionQueue.forEach(i => { i.target[i.where] = this.moduleObjs[i.what.name] })