msfs-webui-devkit
msfs-webui-devkit copied to clipboard
error reloading a toolbar page ( not a panel )
When pressing the R button on a toolbar page that is not part of a panel, the following error appears:
Debugging a toolbar module with the previous version used to work.
Replacing the panel
variable on these lines with this.m_debugPanel
seems to work for me.
if (sessionStorage.getItem("dbgpanel_collapsed") != null) {
const collapsed = sessionStorage.getItem("dbgpanel_collapsed");
- if(collapsed === "true" && !panel.classList.contains("collapsed")){
+ if(collapsed === "true" && !this.m_debugPanel.classList.contains("collapsed")){
this.TogglePanelCollapsed();
- } else if(collapsed === "false" && panel.classList.contains("collapsed")){
+ } else if(collapsed === "false" && this.m_debugPanel.classList.contains("collapsed")){
this.TogglePanelCollapsed();
}
} else {
this.TogglePanelCollapsed();
}
Not sure where the panel
variable is supposed to come from, but I can't find it anywhere in the debug.js code and I am seeing the same error without the above changes.