Skip to content

Commit 59b6e57

Browse files
committed
get type from map and show tune for 1 type
1 parent aac05d4 commit 59b6e57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default class EditorjsList {
218218
/**
219219
* Set the default counter types for the ordered list
220220
*/
221-
this.defaultCounterTypes = this.config?.counterTypes || ['numeric', 'upper-roman', 'lower-roman', 'upper-alpha', 'lower-alpha'];
221+
this.defaultCounterTypes = (this.config as ListConfig).counterTypes || Array.from(OlCounterTypesMap.values()) as OlCounterType[];
222222

223223
const initialData = {
224224
style: this.defaultListStyle,
@@ -372,7 +372,7 @@ export default class EditorjsList {
372372
/**
373373
* Dont show Counter type tune if there is no valid counter types
374374
*/
375-
if (orderedListCountersTunes.children.items!.length > 0) {
375+
if (orderedListCountersTunes.children.items!.length > 1) {
376376
orderedListTunes.push(orderedListCountersTunes);
377377
}
378378

0 commit comments

Comments
 (0)