HTTP server: fixes that were causing page hangs

pull/286/head
Thomas Buckley-Houston 2019-06-19 13:21:41 +03:00
rodzic d6b5951059
commit 95562aa129
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -116,7 +116,13 @@ export default class extends utils.mixins(CommonMixin, TabCommandsMixin) {
sendGlobalConfig(config) {
config.http_server_mode_type = this._calculateMode();
config.start_time = this.start_time;
this.channel.postMessage(`/config,${JSON.stringify(config)}`);
if (this.channel) {
this.channel.postMessage(`/config,${JSON.stringify(config)}`);
} else {
setTimeout(() => {
this.sendGlobalConfig(config);
}, 1);
}
}
_listenForMessages() {

Wyświetl plik

@ -25,6 +25,7 @@ export default class extends utils.mixins(CommonMixin, CommandsMixin) {
}
_postSetupConstructor() {
this._injectCustomCSS();
this.dimensions.channel = this.channel;
this.graphics_builder = new GraphicsBuilder(
this.channel,
@ -191,7 +192,6 @@ export default class extends utils.mixins(CommonMixin, CommandsMixin) {
this.is_dom_loaded = true;
this.log("DOM LOADED");
this._fixStickyElements();
this._injectCustomCSS();
this._willHideText();
});
window.addEventListener("load", () => {