File tree Expand file tree Collapse file tree 1 file changed +20
-17
lines changed Expand file tree Collapse file tree 1 file changed +20
-17
lines changed Original file line number Diff line number Diff line change 918918 const parent = $ (target).closest (' [data-parent]' ).length ? $ (target).closest (' [data-parent]' ).attr (' data-parent' ) : ' root' ;
919919
920920 // check position
921- if (el .getAttribute (' id' ) && $ (target).closest (' .eden-blocks-sidebar' ).length ) {
922- // move back
923- if (oldIndex === 0 ) {
924- // prepend to
925- $ (el).prependTo ($ (source));
926- } else {
927- // find previous
928- $ (el).after (oldPrev);
929- }
930-
931- // get field
932- const field = this .getFields ().find ((fi ) => fi .uuid === el .getAttribute (' id' ));
933-
934- // check
935- if (field .uuid ) {
936- // on remove
937- await this .onRemoveField (field, {});
921+ if ($ (target).closest (' .eden-blocks-sidebar' ).length ) {
922+ // has idd
923+ if (el .getAttribute (' id' )) {
924+ // move back
925+ if (oldIndex === 0 ) {
926+ // prepend to
927+ $ (el).prependTo ($ (source));
928+ } else {
929+ // find previous
930+ $ (el).after (oldPrev);
931+ }
932+
933+ // get field
934+ const field = this .getFields ().find ((fi ) => fi .uuid === el .getAttribute (' id' ));
935+
936+ // check
937+ if (field .uuid ) {
938+ // on remove
939+ await this .onRemoveField (field, {});
940+ }
938941 }
939942
940943 // return
You can’t perform that action at this time.
0 commit comments