Просмотр исходного кода

Small fix with injection

master
peter 5 лет назад
Родитель
Сommit
7a0c88df11
2 измененных файлов: 7 добавлений и 1 удалений
  1. 0
    1
      src/backend/Components/User/LoginManager.ts
  2. 7
    0
      src/backend/Injector/Injector.ts

+ 0
- 1
src/backend/Components/User/LoginManager.ts Просмотреть файл

@@ -110,7 +110,6 @@ implements FrontworkComponent<LoginManagerIfc, LoginManagerFeatureIfc>{
110 110
 
111 111
     initialize = async () => {
112 112
         this.exporters = [this.guild, this.item, this.raid, this.character] 
113
-
114 113
         //set up permissions
115 114
         await Promise.all( 
116 115
             [this, ...this.exporters].flatMap(exp => exp.exportRPCFeatures().map(async (feature) => {

+ 7
- 0
src/backend/Injector/Injector.ts Просмотреть файл

@@ -37,6 +37,13 @@ export const Injector = new class {
37 37
 
38 38
       this.moduleObjs[this.rootInterface.name] = rootobj
39 39
       this.moduleObjs[target.name] = rootobj
40
+      while(this.injectionQueue.length > 0){
41
+        const i = this.injectionQueue.shift()
42
+        if(this.moduleObjs[i.what.name])
43
+          i.target[i.where] = this.moduleObjs[i.what.name]
44
+        else
45
+          this.injectionQueue.push()
46
+      }
40 47
       this.injectionQueue.forEach(i => {
41 48
         i.target[i.where] = this.moduleObjs[i.what.name]
42 49
       })

Загрузка…
Отмена
Сохранить