Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,7 @@ Boot.prototype._addPlugin = function (pluginFn, opts, isAfter) {
}

// we add the plugin to be loaded at the end of the current queue
current.enqueue(plugin, (err) => {
if (err) {
this._error = err
}
})
current.enqueue(obj, (err) => { err && (this._error = err) })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe splitting into three lines is better for git diff or future changes.

Suggested change
current.enqueue(obj, (err) => { err && (this._error = err) })
current.enqueue(obj, (err) => {
err && (this._error = err)
})

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of doubt that this will be changed ever. But for debugging maybe it is better.


return plugin
}
Expand Down Expand Up @@ -289,11 +285,7 @@ Boot.prototype.onClose = function (func) {
}

func[this._isOnCloseHandlerKey] = true
this._closeQ.unshift(func, callback.bind(this))

function callback (err) {
if (err) this._error = err
}
this._closeQ.unshift(func, (err) => { err && (this._error = err) })

return this
}
Expand Down