Skip to content

Commit

Permalink
fixup! repl: fix disruptive autocomplete without inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkgoron committed Jan 31, 2022
1 parent 74b10cd commit eba1b6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/repl/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {} };
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit eba1b6e

Please sign in to comment.