Skip to content

Commit

Permalink
Merge pull request #2393 from bobrippling/setui-missing-mode
Browse files Browse the repository at this point in the history
Guard against Bangle.setUI({ <no mode> })
  • Loading branch information
gfwilliams committed Jul 20, 2023
2 parents a8d456b + a4cb400 commit 1d6d651
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/js/banglejs/Bangle_setUI_F18.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
if ("object"==typeof mode) {
options = mode;
mode = options.mode;
if (!mode) throw new Error("Missing mode in setUI({...})");
}
var redraw = true;
if (global.WIDGETS && WIDGETS.back) {
Expand Down
1 change: 1 addition & 0 deletions libs/js/banglejs/Bangle_setUI_Q3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
if ("object"==typeof mode) {
options = mode;
mode = options.mode;
if (!mode) throw new Error("Missing mode in setUI({...})");
}
var redraw = true;
if (global.WIDGETS && WIDGETS.back) {
Expand Down

0 comments on commit 1d6d651

Please sign in to comment.