mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
decaf cleanup: consider reworking code to avoid use of IIFEs
GitOrigin-RevId: 8d60da088deac4a19c6b6a03083765af547d9570
This commit is contained in:
parent
0a0722a8f8
commit
87544fc5a5
1 changed files with 3 additions and 8 deletions
|
@ -3,7 +3,6 @@
|
|||
/*
|
||||
* decaffeinate suggestions:
|
||||
* DS101: Remove unnecessary use of Array.from
|
||||
* DS205: Consider reworking code to avoid use of IIFEs
|
||||
* DS207: Consider shorter variations of null checks
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
*/
|
||||
|
@ -31,13 +30,9 @@ module.exports = {
|
|||
throw error
|
||||
}
|
||||
this.running = true
|
||||
return (() => {
|
||||
const result = []
|
||||
for (callback of Array.from(this.callbacks)) {
|
||||
result.push(callback())
|
||||
}
|
||||
return result
|
||||
})()
|
||||
for (callback of Array.from(this.callbacks)) {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue