Skip to content

Commit 152ead4

Browse files
committed
fix: remove promises on attributes evaluate
1 parent 98dd0c8 commit 152ead4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

lib/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class Mini {
3333
this._initEntities()
3434
this._initializeGlobalVariables()
3535
Events.applyEvents()
36-
await this.state.evaluate()
36+
this.state.evaluate()
3737
this.observer.init()
3838
const endTime = performance.now()
3939
const executionTime = endTime - startTime

lib/state.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,11 @@ export class State {
206206
this.attachVariableHelpers([varName], entityID)
207207
}
208208

209-
async evaluate() {
210-
const promises = []
211-
209+
evaluate() {
212210
Array.from(this.entities.values()).forEach((entity) => {
213-
promises.push(entity.attributes.evaluate())
211+
entity.attributes.evaluate()
214212
})
215213

216-
await Promise.all(promises)
217-
218214
this.attachVariableHelpers(Array.from(this.variables.keys()))
219215
this.shouldUpdate = true
220216
}

0 commit comments

Comments
 (0)