mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 13:31:21 +00:00
Decaf cleanup: remove Array.from()
This commit is contained in:
parent
971a768c4e
commit
6c020f6e54
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
* decaffeinate suggestions:
|
||||
* DS101: Remove unnecessary use of Array.from
|
||||
* DS102: Remove unnecessary code created because of implicit returns
|
||||
* DS207: Consider shorter variations of null checks
|
||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
||||
|
@ -228,6 +227,8 @@ module.exports = Metrics = {
|
|||
timeAsyncMethod: require('./timeAsyncMethod'),
|
||||
|
||||
close() {
|
||||
return Array.from(destructors).map(func => func())
|
||||
for (const func of destructors) {
|
||||
func()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue