Skip to content

Commit c60e4b8

Browse files
authored
fix: Check if saved separator is a string (#944)
1 parent 33fdf9e commit c60e4b8

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/document_applier.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ export class DocumentApplier {
8989
separator: this.separator,
9090
},
9191
items => {
92-
this.separator = items.separator;
92+
if (typeof items.separator === 'string') {
93+
this.separator = items.separator;
94+
}
9395
resolve();
9496
}
9597
);

src/options.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ function restoreOptions() {
6464
separator: '\u200B',
6565
},
6666
items => {
67-
setSeparator(items.separator);
67+
if (typeof items.separator === 'string') {
68+
setSeparator(items.separator);
69+
}
6870
}
6971
);
7072
}

0 commit comments

Comments
 (0)