forked from extern/egroupware
Check element exist before applying to sortable as sortablejs needs an HTMLElement instance
This commit is contained in:
parent
4e7ebc509a
commit
466371fa03
@ -783,6 +783,8 @@ export abstract class EgwApp
|
||||
.addClass("ui-helper-clearfix");
|
||||
|
||||
let el = document.getElementById('favorite_sidebox_'+this.appname)?.getElementsByTagName('ul')[0];
|
||||
if (el && el instanceof HTMLElement)
|
||||
{
|
||||
let sortablejs = Sortable.create(el, {
|
||||
ghostClass: 'ui-fav-sortable-placeholder',
|
||||
draggable: 'li:not([data-id$="add"])',
|
||||
@ -794,6 +796,7 @@ export abstract class EgwApp
|
||||
self._refresh_fav_nm();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Bind favorite de-select
|
||||
var egw_fw = egw_getFramework();
|
||||
|
Loading…
Reference in New Issue
Block a user