File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
lib/node_modules/@stdlib/repl/presentation/lib/commands Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -36,19 +36,21 @@ function command( pres ) {
36
36
* @private
37
37
*/
38
38
function onCommand ( ) {
39
- pres . _repl . once ( 'drain' , onDrain ) ; // eslint-disable-line no-underscore-dangle
40
-
41
- /**
42
- * Callback invoked upon a `drain` event.
43
- *
44
- * @private
45
- */
46
- function onDrain ( ) {
47
- pres . first ( ) . show ( ) ;
48
- }
39
+ // bind `pres` so `onDrain` still has access to it:
40
+ pres . _repl . once ( 'drain' , ( ) => onDrain ( pres ) ) ; // eslint-disable-line no-underscore-dangle
49
41
}
50
42
}
51
43
44
+ /**
45
+ * Callback invoked upon a `drain` event.
46
+ *
47
+ * @private
48
+ * @param {Presentation } pres - presentation instance
49
+ */
50
+ function onDrain ( pres ) {
51
+ pres . first ( ) . show ( ) ;
52
+ }
53
+
52
54
53
55
// EXPORTS //
54
56
You can’t perform that action at this time.
0 commit comments