Browse Source

fix: check sortable.el defined or not before invoking destroy method (#8416)

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/8438/head
Pranav C 7 months ago committed by GitHub
parent
commit
5be970b505
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nc-gui/components/cell/attachment/sort.ts

4
packages/nc-gui/components/cell/attachment/sort.ts

@ -51,7 +51,9 @@ export function useSortable(
const _element = unref(element) const _element = unref(element)
onCleanup(() => { onCleanup(() => {
if (_element && sortable) sortable.destroy() if (_element && sortable?.el) {
sortable.destroy()
}
}) })
if (_element && !unref(isReadonly)) initSortable(_element) if (_element && !unref(isReadonly)) initSortable(_element)

Loading…
Cancel
Save