Browse Source

Small fix with injection

master
peter 5 years ago
parent
commit
7a0c88df11
2 changed files with 7 additions and 1 deletions
  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 View File

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

+ 7
- 0
src/backend/Injector/Injector.ts View File

37
 
37
 
38
       this.moduleObjs[this.rootInterface.name] = rootobj
38
       this.moduleObjs[this.rootInterface.name] = rootobj
39
       this.moduleObjs[target.name] = rootobj
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
       this.injectionQueue.forEach(i => {
47
       this.injectionQueue.forEach(i => {
41
         i.target[i.where] = this.moduleObjs[i.what.name]
48
         i.target[i.where] = this.moduleObjs[i.what.name]
42
       })
49
       })

Loading…
Cancel
Save