diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/commands/last.js b/lib/node_modules/@stdlib/repl/presentation/lib/commands/last.js index 4d4590f3bd5b..aeb7096f5b1e 100644 --- a/lib/node_modules/@stdlib/repl/presentation/lib/commands/last.js +++ b/lib/node_modules/@stdlib/repl/presentation/lib/commands/last.js @@ -20,6 +20,16 @@ // MAIN // +/** +* Callback invoked upon a `drain` event. +* +* @private +* @param {Presentation} pres - presentation instance +*/ +function onDrain( pres ) { + pres.last().show(); +} + /** * Returns a callback to be invoked upon calling the `last` command. * @@ -36,20 +46,11 @@ function command( pres ) { * @private */ function onCommand() { - pres._repl.once( 'drain', onDrain ); // eslint-disable-line no-underscore-dangle - - /** - * Callback invoked upon a `drain` event. - * - * @private - */ - function onDrain() { - pres.last().show(); - } + pres._repl.once( 'drain', onDrain.bind( null, pres ) ); // eslint-disable-line no-underscore-dangle } } // EXPORTS // -module.exports = command; +module.exports = command; \ No newline at end of file