Skip to content

Commit eba1b6e

Browse files
committed
fixup! repl: fix disruptive autocomplete without inspector
1 parent 74b10cd commit eba1b6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/repl/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function isRecoverableError(e, code) {
142142

143143
function setupPreview(repl, contextSymbol, bufferSymbol, active) {
144144
// Simple terminals can't handle previews.
145-
if (process.env.TERM === 'dumb' || !active || !process.features.inspector) {
145+
if (process.env.TERM === 'dumb' || !active) {
146146
return { showPreview() {}, clearPreview() {} };
147147
}
148148

@@ -367,7 +367,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) {
367367

368368
const showPreview = () => {
369369
// Prevent duplicated previews after a refresh.
370-
if (inputPreview !== null || !repl.isCompletionEnabled) {
370+
if (inputPreview !== null || !repl.isCompletionEnabled || !process.features.inspector) {
371371
return;
372372
}
373373

0 commit comments

Comments
 (0)