mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Decaf cleanup: remove unnecessary Array.from()
This commit is contained in:
parent
ca10ff164f
commit
08be54a43e
1 changed files with 4 additions and 5 deletions
|
@ -8,7 +8,6 @@
|
||||||
// Fix any style issues and re-enable lint.
|
// Fix any style issues and re-enable lint.
|
||||||
/*
|
/*
|
||||||
* decaffeinate suggestions:
|
* decaffeinate suggestions:
|
||||||
* DS101: Remove unnecessary use of Array.from
|
|
||||||
* DS102: Remove unnecessary code created because of implicit returns
|
* DS102: Remove unnecessary code created because of implicit returns
|
||||||
* DS103: Rewrite code to no longer use __guard__
|
* DS103: Rewrite code to no longer use __guard__
|
||||||
* DS205: Consider reworking code to avoid use of IIFEs
|
* DS205: Consider reworking code to avoid use of IIFEs
|
||||||
|
@ -77,7 +76,7 @@ module.exports = DockerRunner = {
|
||||||
const volumes = {}
|
const volumes = {}
|
||||||
volumes[directory] = '/compile'
|
volumes[directory] = '/compile'
|
||||||
|
|
||||||
command = Array.from(command).map((arg) =>
|
command = command.map((arg) =>
|
||||||
__guardMethod__(arg.toString(), 'replace', (o) =>
|
__guardMethod__(arg.toString(), 'replace', (o) =>
|
||||||
o.replace('$COMPILE_DIR', '/compile')
|
o.replace('$COMPILE_DIR', '/compile')
|
||||||
)
|
)
|
||||||
|
@ -177,7 +176,7 @@ module.exports = DockerRunner = {
|
||||||
_callback = function (error, output) {}
|
_callback = function (error, output) {}
|
||||||
}
|
}
|
||||||
const callback = function (...args) {
|
const callback = function (...args) {
|
||||||
_callback(...Array.from(args || []))
|
_callback(...args)
|
||||||
// Only call the callback once
|
// Only call the callback once
|
||||||
return (_callback = function () {})
|
return (_callback = function () {})
|
||||||
}
|
}
|
||||||
|
@ -538,7 +537,7 @@ module.exports = DockerRunner = {
|
||||||
_callback = function (error, exitCode) {}
|
_callback = function (error, exitCode) {}
|
||||||
}
|
}
|
||||||
const callback = function (...args) {
|
const callback = function (...args) {
|
||||||
_callback(...Array.from(args || []))
|
_callback(...args)
|
||||||
// Only call the callback once
|
// Only call the callback once
|
||||||
return (_callback = function () {})
|
return (_callback = function () {})
|
||||||
}
|
}
|
||||||
|
@ -668,7 +667,7 @@ module.exports = DockerRunner = {
|
||||||
return callback(error)
|
return callback(error)
|
||||||
}
|
}
|
||||||
const jobs = []
|
const jobs = []
|
||||||
for (const container of Array.from(containers || [])) {
|
for (const container of containers) {
|
||||||
;((container) =>
|
;((container) =>
|
||||||
DockerRunner.examineOldContainer(container, function (
|
DockerRunner.examineOldContainer(container, function (
|
||||||
err,
|
err,
|
||||||
|
|
Loading…
Reference in a new issue