Skip to content

Commit f2cc322

Browse files
committed
Add guard for error handling
fixes #1158
1 parent 7a1b019 commit f2cc322

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/jquery.fancytree.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@
180180

181181
// #1041: Raised exceptions may not be visible in the browser
182182
// console if inside promise chains, so we also print directly:
183-
$.ui.fancytree.error(msg);
183+
if ( $.hasOwnProperty('ui') && $.ui.hasOwnProperty('fancytree') ) {
184+
$.ui.fancytree.error(msg);
185+
}
184186

185187
// Throw exception:
186188
$.error(msg);

0 commit comments

Comments
 (0)