From 4eda52ac89587515d6a20574c0711fe22de0a8c0 Mon Sep 17 00:00:00 2001 From: wbfsa Date: Tue, 25 Aug 2020 20:21:47 +0800 Subject: [PATCH] fix(websocket bux): bug --- src/controllers/server.js | 5 ++++- src/index.html | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/server.js b/src/controllers/server.js index 6ef4891..a66814d 100644 --- a/src/controllers/server.js +++ b/src/controllers/server.js @@ -124,7 +124,10 @@ const server = { let msg = pako.gzip(encodeURIComponent(JSON.stringify(d)), { to: "string" }); - _this.websocket.send(msg); + if(_this.websocket!=null){ + _this.websocket.send(msg); + } + }, websocket: null, wxErrorCount: 0, diff --git a/src/index.html b/src/index.html index 205e4b8..9d07bf7 100644 --- a/src/index.html +++ b/src/index.html @@ -37,6 +37,8 @@ allowEdit:true, forceCalculation:false, plugins: ['chart'], + allowUpdate:true, + updateUrl:"www.baidu.com", data: [sheetCell,sheetFormula,sheetConditionFormat,sheetTable,sheetSparkline,sheetComment,sheetPivotTableData,sheetPivotTable,sheetChart] })