rimecms 0.28.4 → 0.28.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,14 +45,12 @@
45
45
  onEnd: function (evt) {
46
46
  const { newIndex, to } = evt;
47
47
 
48
- //@ts-expect-error annoying
49
- const initialPath = evt.item.__attributes['data-path'];
50
- //@ts-expect-error annoying
51
- const targetListPath = to.__attributes['data-path'];
48
+ const initialPath = evt.item.dataset.path;
49
+ const targetListPath = to.dataset.path;
52
50
  const isTargetPathRoot = targetListPath === path;
53
51
  const targetPath = `${targetListPath}${!isTargetPathRoot ? '._children' : ''}.${newIndex}`;
54
52
 
55
- if (initialPath !== targetPath) {
53
+ if (initialPath !== undefined && initialPath !== targetPath) {
56
54
  treeState.moveItem(initialPath.replace(`${path}.`, ''), targetPath.replace(`${path}.`, ''));
57
55
  resetSortable();
58
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimecms",
3
- "version": "0.28.4",
3
+ "version": "0.28.5",
4
4
  "homepage": "https://github.com/bienbiendev/rime",
5
5
  "scripts": {
6
6
  "dev": "vite dev",