mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Decaf cleanup: remove Array.from()
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user