Skip to content

Commit

Permalink
repl: fix disruptive autocomplete without inspector
Browse files Browse the repository at this point in the history
Fix an issue where the autocomplete wrongly autocompletes
a value from a correct value to an undefined value when node
is built without an inspector by disabling the preview view

fixes: nodejs#40635
  • Loading branch information
Linkgoron committed Oct 29, 2021
1 parent e937662 commit 02158fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/repl/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ 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 02158fb

Please sign in to comment.