File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ const {
43
43
validateString,
44
44
validateUint32,
45
45
} = require ( 'internal/validators' ) ;
46
+ const { kEmptyObject } = require ( 'internal/util' ) ;
46
47
const {
47
48
inspect,
48
49
getStringWidth,
@@ -922,7 +923,7 @@ class Interface extends InterfaceConstructor {
922
923
// Handle a write from the tty
923
924
[ kTtyWrite ] ( s , key ) {
924
925
const previousKey = this [ kPreviousKey ] ;
925
- key = key || { } ;
926
+ key = key || kEmptyObject ;
926
927
this [ kPreviousKey ] = key ;
927
928
928
929
// Activate or deactivate substring search.
Original file line number Diff line number Diff line change @@ -100,7 +100,10 @@ const {
100
100
kSubstringSearch,
101
101
} = require ( 'internal/readline/utils' ) ;
102
102
103
- const { promisify } = require ( 'internal/util' ) ;
103
+ const {
104
+ kEmptyObject,
105
+ promisify,
106
+ } = require ( 'internal/util' ) ;
104
107
105
108
const { StringDecoder } = require ( 'string_decoder' ) ;
106
109
@@ -987,7 +990,7 @@ Interface.prototype._moveCursor = function(dx) {
987
990
} ;
988
991
989
992
function _ttyWriteDumb ( s , key ) {
990
- key = key || { } ;
993
+ key = key || kEmptyObject ;
991
994
992
995
if ( key . name === 'escape' ) return ;
993
996
You can’t perform that action at this time.
0 commit comments