Skip to content

Commit

Permalink
Add guard for error handling (#1159)
Browse files Browse the repository at this point in the history
* Add guard for error handling
fixes #1158

* Fix lint errors

* Update changelog

---------

Co-authored-by: crowne <crow.neil@gmail.com>
Co-authored-by: Martin Wendt <github@wwwendt.de>
  • Loading branch information
3 people committed Sep 8, 2024
1 parent 7a1b019 commit ea2be93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 2.38.4-0 / Unreleased

- [Changed] #1143 Improve the appearance of vertical connectors of skin XP
- [Fixed] [#1157](https://github.com/mar10/fancytree/issues/1157) Sporadic error restoring expansion
- [Changed] #1143 Improve the appearance of vertical connectors of skin XP
- [Fixed] [#1157](https://github.com/mar10/fancytree/issues/1157) Sporadic error restoring expansion
- [Fixed] [#1158](https://github.com/mar10/fancytree/issues/1158) Add guard for error handling

# 2.38.3 / 2023-02-01

Expand Down
4 changes: 3 additions & 1 deletion src/jquery.fancytree.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@

// #1041: Raised exceptions may not be visible in the browser
// console if inside promise chains, so we also print directly:
$.ui.fancytree.error(msg);
if ($.ui && $.ui.fancytree) {
$.ui.fancytree.error(msg);
}

// Throw exception:
$.error(msg);
Expand Down

0 comments on commit ea2be93

Please sign in to comment.