Skip to content

Commit

Permalink
Replace ?? with || to pass checks
Browse files Browse the repository at this point in the history
No difference in operation, even for unexpected values for the "property" parameter.
  • Loading branch information
96LawDawg committed Jan 16, 2025
1 parent 163b9c6 commit ca854ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/js/widgets/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ export class Widget extends StateManaged {
if (a.func == 'RESET') {
setDefaults(a, { property: 'resetProperties' });
for(const widget of widgets.values())
for(const [ key, value ] of Object.entries(widget.get(a.property) ?? {}))
for(const [ key, value ] of Object.entries(widget.get(a.property) || {}))
await widget.set(key, value);
if (jeRoutineLogging) {
jeLoggingRoutineOperationSummary(`Reset properties for widgets with property '${a.property}'`);
Expand Down

0 comments on commit ca854ff

Please sign in to comment.