@ones-editor/editor 0.0.9-beta.4 → 0.0.9-beta.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.
package/dist/index.js
CHANGED
|
@@ -42247,7 +42247,7 @@ var __publicField = (obj, key, value) => {
|
|
|
42247
42247
|
return true;
|
|
42248
42248
|
}
|
|
42249
42249
|
}
|
|
42250
|
-
if (list2.level > prev.level) {
|
|
42250
|
+
if ((list2.level || 1) > (prev.level || 1)) {
|
|
42251
42251
|
return true;
|
|
42252
42252
|
}
|
|
42253
42253
|
return false;
|
|
@@ -42269,7 +42269,7 @@ var __publicField = (obj, key, value) => {
|
|
|
42269
42269
|
return true;
|
|
42270
42270
|
}
|
|
42271
42271
|
}
|
|
42272
|
-
if (list2.level > next.level) {
|
|
42272
|
+
if ((list2.level || 1) > (next.level || 1)) {
|
|
42273
42273
|
return true;
|
|
42274
42274
|
}
|
|
42275
42275
|
return false;
|
|
@@ -42466,7 +42466,7 @@ var __publicField = (obj, key, value) => {
|
|
|
42466
42466
|
editor.updateBlockData(c.block, {
|
|
42467
42467
|
...oldData,
|
|
42468
42468
|
groupId,
|
|
42469
|
-
level: oldData.level - 1
|
|
42469
|
+
level: (oldData.level || 1) - 1
|
|
42470
42470
|
});
|
|
42471
42471
|
if (c.children.length) {
|
|
42472
42472
|
changeChildrenGroupId(editor, c.children, oldData.groupId);
|
|
@@ -42668,7 +42668,7 @@ var __publicField = (obj, key, value) => {
|
|
|
42668
42668
|
const oldData2 = editor.getBlockData(b);
|
|
42669
42669
|
editor.updateBlockData(b, {
|
|
42670
42670
|
...oldData2,
|
|
42671
|
-
level: oldData2.level + 1
|
|
42671
|
+
level: (oldData2.level || 1) + 1
|
|
42672
42672
|
});
|
|
42673
42673
|
});
|
|
42674
42674
|
editor.doc.endBatchUpdate();
|
|
@@ -43118,7 +43118,7 @@ var __publicField = (obj, key, value) => {
|
|
|
43118
43118
|
const listData = blockData;
|
|
43119
43119
|
const { level, start, groupId } = listData;
|
|
43120
43120
|
const type = getListType(listData);
|
|
43121
|
-
blockElement.setAttribute("data-list-level", `${level}`);
|
|
43121
|
+
blockElement.setAttribute("data-list-level", `${level || 1}`);
|
|
43122
43122
|
blockElement.setAttribute("data-list-start", `${start || 1}`);
|
|
43123
43123
|
blockElement.setAttribute("data-list-group-id", `${groupId}`);
|
|
43124
43124
|
blockElement.setAttribute("data-list-type", type);
|