Skip to content

Commit

Permalink
Merge pull request #805 from FlowFuse/onload-notifiction
Browse files Browse the repository at this point in the history
Fix - In onLoad, check if hardcoded widget or not
  • Loading branch information
joepavitt authored Apr 26, 2024
2 parents a56ab9e + a6968a9 commit 0ca42aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion nodes/config/ui_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,9 @@ module.exports = function (RED) {
// console.log('conn:' + conn.id, 'on:widget-load:' + id, msg)

const { wNode, widgetEvents } = getWidgetAndConfig(id)
if (!wNode) {
// any widgets we hard-code into our front end (e.g ui-notification for connection alerts) will start with ui-
// Node-RED built nodes will be a random UUID
if (!wNode && !id.startsWith('ui-')) {
console.log('widget does not exist any more')
return // widget does not exist any more (e.g. deleted from NR and deployed BUT the ui page was not refreshed)
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/layouts/Baseline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/>
<!-- Explicitly render a notification widget for our own internal alerting -->
<ui-notification
id="inline-alert" ref="alert"
id="ui-inline-alert" ref="alert"
:props="{position: 'top right', showCountdown: alert.showCountdown, displayTime: alert.displayTime, raw: true, allowDismiss: alert.allowDismiss}"
/>
</div>
Expand Down

0 comments on commit 0ca42aa

Please sign in to comment.