From 8dfce986af09405ff863fb00adf52d25e97d0340 Mon Sep 17 00:00:00 2001 From: Karlie Fang Date: Fri, 12 Jul 2024 13:06:13 -0400 Subject: [PATCH] refactor: simplify `convertMeiQuoteSign` --- src/Editor/ColumnTools.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Editor/ColumnTools.ts b/src/Editor/ColumnTools.ts index f706d3d..211f33b 100644 --- a/src/Editor/ColumnTools.ts +++ b/src/Editor/ColumnTools.ts @@ -46,10 +46,9 @@ export class ColumnTools { */ convertMeiQuoteSign(body: any[]) { for (let i = 0; i < body.length; i++) { - if (body[i].mei === undefined) { - continue; + if (body[i].mei) { + body[i].mei = body[i].mei.replace(/“/g, '"').replace(/”/g, '"'); } - body[i].mei = body[i].mei.replace(/“/g, '"').replace(/”/g, '"'); } } }