@xuda.io/xuda-progs-loader-module 1.0.109 → 1.0.111
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.
- package/index.mjs +8 -7
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -30,10 +30,11 @@ export const get_doc_from_studio = async function (SESSION_ID, app_id, idP) {
|
|
|
30
30
|
app_id,
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
const _lp_handler = function (data) {
|
|
34
34
|
resolve(data.data);
|
|
35
|
-
|
|
36
|
-
}
|
|
35
|
+
func.runtime.platform.off('live_preview_get_obj_response_' + idP, _lp_handler);
|
|
36
|
+
};
|
|
37
|
+
func.runtime.platform.on('live_preview_get_obj_response_' + idP, _lp_handler);
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
};
|
|
@@ -54,11 +55,11 @@ export const get_doc_from_websocket = async function (SESSION_ID, app_id, idP) {
|
|
|
54
55
|
service: 'get_doc_obj_from_build',
|
|
55
56
|
data: { doc_id: idP },
|
|
56
57
|
});
|
|
57
|
-
|
|
58
|
-
// views_ret = data.data;
|
|
58
|
+
const _doc_handler = function (data) {
|
|
59
59
|
resolve(data.data);
|
|
60
|
-
|
|
61
|
-
}
|
|
60
|
+
func.runtime.platform.off('get_doc_obj_from_build_response_' + idP, _doc_handler);
|
|
61
|
+
};
|
|
62
|
+
func.runtime.platform.on('get_doc_obj_from_build_response_' + idP, _doc_handler);
|
|
62
63
|
} else {
|
|
63
64
|
throw new Error('fail to fetch from ws websocket inactive');
|
|
64
65
|
}
|