Skip to content

Commit

Permalink
Merge pull request #172 from mariusGundersen/terminal-condition
Browse files Browse the repository at this point in the history
Don't load the terminal when there is no document
  • Loading branch information
gfwilliams authored Dec 4, 2023
2 parents f4bca51 + 0b04407 commit e565e2a
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 e565e2a

Please sign in to comment.