From c90a5678cf5e7daeb76c4d9e41bec661455db458 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Thu, 29 Mar 2018 14:23:33 +0200 Subject: [PATCH] don't repatch node-pty on window reload --- app/bufferizedPTY.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/bufferizedPTY.js b/app/bufferizedPTY.js index 7597b826..37848ae6 100644 --- a/app/bufferizedPTY.js +++ b/app/bufferizedPTY.js @@ -1,6 +1,10 @@ module.exports = function patchPTYModule (path) { const mod = require(path) const oldSpawn = mod.spawn + if (mod.patched) { + return mod + } + mod.patched = true mod.spawn = (file, args, opt) => { let terminal = oldSpawn(file, args, opt) let timeout = null