Skip to content

Commit

Permalink
Don't load the terminal when there is no document
Browse files Browse the repository at this point in the history
This fixes a problem with using this in VSCode extensions
  • Loading branch information
mariusGundersen committed Dec 1, 2023
1 parent f4bca51 commit 0b04407
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
!process.versions.electron)
return; // don't load this in std NodeJS

// Don't load if there is no document to attach the terminal to
if(typeof document === "undefined") return;

var onInputData = function(d){}; // the handler for character data from user

/* we don't update the terminal as soon as new data arrives as that might block
Expand Down

0 comments on commit 0b04407

Please sign in to comment.