Skip to content

Commit 8212c29

Browse files
author
Chris K
committed
Fix for DFL-3249, Throws on default path when starting in remote debug mode.
1 parent 2a30777 commit 8212c29

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/client/client.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ window.cls.Client = function()
8686
var tmpl = window.templates.remote_debug_settings(port + 1);
8787
remote_debug_setting.clearAndRender(tmpl);
8888
}
89-
90-
UI.get_instance().get_button("toggle-remote-debug-overlay")
91-
.addClass("alert");
89+
var button = UI.get_instance().get_button("toggle-remote-debug-overlay");
90+
if (button)
91+
button.addClass("alert");
9292

9393
Overlay.get_instance().set_info_content(
9494
["p", ui_strings.S_INFO_ERROR_LISTENING.replace(/%s/, port)]
@@ -372,13 +372,12 @@ window.cls.Client = function()
372372
window.messages.post("window-controls-created", {window_controls: win_ctrls});
373373

374374
var button = UI.get_instance().get_button("toggle-remote-debug-overlay");
375-
if (this.current_client && this.connection_is_remote(this.current_client))
375+
if (button)
376376
{
377-
button.addClass("remote-active");
378-
}
379-
else
380-
{
381-
button.removeClass("remote-active");
377+
if (this.current_client && this.connection_is_remote(this.current_client))
378+
button.addClass("remote-active");
379+
else
380+
button.removeClass("remote-active");
382381
}
383382
};
384383

src/ui-scripts/actions/globalactionhandler.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,9 @@
266266

267267
if (overlay_id == "remote-debug-overlay" && (!client || !client.connected))
268268
{
269-
UI.get_instance().get_button("toggle-remote-debug-overlay")
270-
.removeClass("alert");
269+
var button = UI.get_instance().get_button("toggle-remote-debug-overlay");
270+
if (button)
271+
button.removeClass("alert");
271272
eventHandlers.click['cancel-remote-debug'](); // TODO: make a proper action
272273
}
273274

0 commit comments

Comments
 (0)