Skip to content

Commit c7ba229

Browse files
committed
Fix - no need callback in dropItem
Now it provides Promise API which solves that problem
1 parent 103a1c2 commit c7ba229

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/gui/HierarchyPainter.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,8 +2023,8 @@ class HierarchyPainter extends BasePainter {
20232023
* @private */
20242024
dropItem(itemname, divid, opt) {
20252025

2026-
if (opt && typeof opt === 'function') { call_back = opt; opt = ""; }
2027-
if (opt===undefined) opt = "";
2026+
if ((opt === undefined) || (typeof opt === 'function'))
2027+
opt = "";
20282028

20292029
let drop_complete = (drop_painter, is_main_painter) => {
20302030
if (!is_main_painter && (typeof drop_painter?.setItemName == 'function'))

0 commit comments

Comments
 (0)