diff --git a/bin/thread.js b/bin/thread.js index 8f2b29b..2b0ae6b 100644 --- a/bin/thread.js +++ b/bin/thread.js @@ -22,7 +22,7 @@ function DecodeGenerator(){ var charset; return function (data){ - if (data) { + if (Buffer.isBuffer(data)) { if (charset === undefined) { charset = jschardet.detect(data).encoding; } diff --git a/static/js/components/app-main/index.js b/static/js/components/app-main/index.js index 88474a2..583f5eb 100644 --- a/static/js/components/app-main/index.js +++ b/static/js/components/app-main/index.js @@ -216,7 +216,6 @@ module.exports = Vue.component('app-main', { case 'data': break; case 'error': - data = '\u001b[31m发生错误: \u001b[0m' + data + '\r\n'; break; case 'close': data = '\u001b[32m' + (status === 1 ? '执行' : '结束') + '命令成功\u001b[0m\r\n';