Skip to content

Commit

Permalink
Fix: Add proper JS promise error handling, resolves moodle-an-hochsch…
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace authored Apr 20, 2024
1 parent b5a84c5 commit 5ffc920
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ moodle-theme_boost_union
Changes
-------

### Unreleased

* 2024-04-20 - Cleanup: Add proper JS promise error handling, resolves #435.

### v4.3-r11

* 2024-04-01 - Bugfix: Site support form success message is now shown above advert tiles / the slider on frontpage, partly resolves #488.
Expand Down
2 changes: 1 addition & 1 deletion amd/build/fontawesome-popover.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/fontawesome-popover.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/offcanvas.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/offcanvas.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions amd/src/fontawesome-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

define(['jquery', 'theme_boost/popover', 'core/fragment'], function($, popover, Fragment) {
define(['jquery', 'theme_boost/popover', 'core/fragment', 'core/notification'], function($, popover, Fragment, Notification) {

const SELECTORS = {
PICKERCONTAINER: '.fontawesome-iconpicker-popover',
Expand Down Expand Up @@ -132,7 +132,6 @@ define(['jquery', 'theme_boost/popover', 'core/fragment'], function($, popover,
}

// Fetch the icons list and setup popover with icons list.
// eslint-disable-next-line promise/valid-params
getIconList().then(function(html) {

$(pickerInput).popover({
Expand Down Expand Up @@ -161,7 +160,7 @@ define(['jquery', 'theme_boost/popover', 'core/fragment'], function($, popover,
});
});
return;
}).catch();
}).catch(Notification.exception);

document.addEventListener('click', e => {
if (pickerIsShown && !e.target.closest(SELECTORS.PICKERCONTAINER)) {
Expand Down
Loading

0 comments on commit 5ffc920

Please sign in to comment.