From b00af9244b89e85e39b00d03abb65962a9884413 Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Wed, 13 Aug 2025 09:53:29 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20replace=5Fword=E4=B8=BAnull=EF=BC=8C?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manuscript-writer/check/components/content-card/index.vue | 2 +- .../manuscript/check/components/content-card/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/creative-generation-workshop/manuscript-writer/check/components/content-card/index.vue b/src/views/creative-generation-workshop/manuscript-writer/check/components/content-card/index.vue index 7737510..8db2ce7 100644 --- a/src/views/creative-generation-workshop/manuscript-writer/check/components/content-card/index.vue +++ b/src/views/creative-generation-workshop/manuscript-writer/check/components/content-card/index.vue @@ -67,7 +67,7 @@ export default { const sortedRules = [...rules].sort((a, b) => b.word.length - a.word.length); const replacedContent = sortedRules.reduce((result, rule) => { - if (!rule.word || !rule.replace_word) return result; + if (!rule.word) return result; const escapedWord = escapeRegExp(rule.word); const regex = new RegExp(escapedWord, 'g'); diff --git a/src/views/creative-generation-workshop/manuscript/check/components/content-card/index.vue b/src/views/creative-generation-workshop/manuscript/check/components/content-card/index.vue index 74506bb..b06e57f 100644 --- a/src/views/creative-generation-workshop/manuscript/check/components/content-card/index.vue +++ b/src/views/creative-generation-workshop/manuscript/check/components/content-card/index.vue @@ -68,7 +68,7 @@ export default { const sortedRules = [...rules].sort((a, b) => b.word.length - a.word.length); const replacedContent = sortedRules.reduce((result, rule) => { - if (!rule.word || !rule.replace_word) return result; + if (!rule.word) return result; const escapedWord = escapeRegExp(rule.word); const regex = new RegExp(escapedWord, 'g');