Skip to content

Commit cbb1cf6

Browse files
refact: Improve code style
1 parent cd0937b commit cbb1cf6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

panel/src/components/Forms/Input/TextareaInput.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ export default {
337337
return this.$nextTick();
338338
},
339339
async toggle(before, after) {
340-
after = after ?? before;
340+
after ??= before;
341341
const selection = this.selection();
342342
343343
if (selection.startsWith(before) && selection.endsWith(after)) {
@@ -354,7 +354,8 @@ export default {
354354
this.$panel.upload.pick(this.uploadOptions);
355355
},
356356
async wrap(before, after) {
357-
return this.insert(before + this.selection() + (after ?? before));
357+
after ??= before;
358+
await this.insert(before + this.selection() + after);
358359
}
359360
}
360361
};

0 commit comments

Comments
 (0)