@seafile/sdoc-editor 2.0.108 → 2.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,6 +31,7 @@ var JSBridge = /*#__PURE__*/(0, _createClass2["default"])(function JSBridge() {
31
31
  (0, _defineProperty2["default"])(this, "initJSEventHandler", function () {
32
32
  if (!window.WebViewJavascriptBridge) return;
33
33
  window.WebViewJavascriptBridge.registerHandler('callJsFunction', function (sData, responseCallback) {
34
+ console.log('aa');
34
35
  if (!sData) return;
35
36
  var parsedData = null;
36
37
  try {
@@ -39,12 +40,20 @@ var JSBridge = /*#__PURE__*/(0, _createClass2["default"])(function JSBridge() {
39
40
  console.log('parsed error');
40
41
  parsedData = null;
41
42
  }
42
- if (!parsedData) return;
43
+ if (!parsedData) {
44
+ console.log('bb');
45
+ responseCallback(JSON.stringify({
46
+ success: true
47
+ }));
48
+ return;
49
+ }
43
50
  var _parsedData = parsedData,
44
51
  action = _parsedData.action,
45
52
  data = _parsedData.data;
46
53
  var eventHandler = _this.eventHandlerMap[action];
54
+ console.log('cc');
47
55
  var execActionSucceed = eventHandler(JSON.parse(data));
56
+ console.log('dd');
48
57
  if (execActionSucceed) {
49
58
  responseCallback(JSON.stringify({
50
59
  success: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.108",
3
+ "version": "2.0.109",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "d238a53b03455587132e267e67decbfb73894aec"
73
+ "gitHead": "b1e4c5938b1b6f149eb3d3933c8c13db22f8b179"
74
74
  }