diff --git a/lib/internal/repl/utils.js b/lib/internal/repl/utils.js index 9aeff77a17e921..fe62e4c29ef68e 100644 --- a/lib/internal/repl/utils.js +++ b/lib/internal/repl/utils.js @@ -142,7 +142,7 @@ function isRecoverableError(e, code) { function setupPreview(repl, contextSymbol, bufferSymbol, active) { // Simple terminals can't handle previews. - if (process.env.TERM === 'dumb' || !active || !process.features.inspector) { + if (process.env.TERM === 'dumb' || !active) { return { showPreview() {}, clearPreview() {} }; } @@ -367,7 +367,7 @@ function setupPreview(repl, contextSymbol, bufferSymbol, active) { const showPreview = () => { // Prevent duplicated previews after a refresh. - if (inputPreview !== null || !repl.isCompletionEnabled) { + if (inputPreview !== null || !repl.isCompletionEnabled || !process.features.inspector) { return; }