Skip to content

Commit

Permalink
try to handle disabled groups and tabs more cleanly
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Conway-Jones committed Jul 5, 2021
1 parent 55c1865 commit 8f9d5e2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,7 @@
- Fix dropdown to allow use of id property if selecting an object. Issue #707
- Activate deploy button on any change to site options (even a non-change)
- Fix spacer node to be on tab so can be exported as part of the tab (needs NRv2)
- Try to handle disabled groups and tabs more cleanly.

### 2.29.3: Maintenance Release

Expand Down
2 changes: 1 addition & 1 deletion dist/dashboard.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
# Time: Mon Jul 05 2021 09:44:17 GMT+0100 (British Summer Time)
# Time: Mon Jul 05 2021 15:46:11 GMT+0100 (British Summer Time)

CACHE:
i18n.js
Expand Down
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -70,6 +70,7 @@ function addWidget(RED, options) {

if (is_local) {
group = RED.nodes.getNode(options.group);
if (group === null) { return; }
tab = RED.nodes.getNode(group.config.tab);
ui_control.width = options.hasOwnProperty("width") ? options.width : group.config.width;
ui_control.height = options.hasOwnProperty("height") ? options.height : 0;
Expand Down
1 change: 1 addition & 0 deletions ui.js
Expand Up @@ -495,6 +495,7 @@ function addControl(tab, groupHeader, control) {
if (tab && tab.hasOwnProperty("id")) { return t.id === tab.id }
});
if (!foundTab) {
if (tab === null) { return; }
foundTab = {
id: tab.id,
header: tab.config.name,
Expand Down

0 comments on commit 8f9d5e2

Please sign in to comment.