aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/textReplace.tsx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/textReplace.tsx b/src/plugins/textReplace.tsx
index e161168..1e8aca7 100644
--- a/src/plugins/textReplace.tsx
+++ b/src/plugins/textReplace.tsx
@@ -123,6 +123,7 @@ function TextReplace({ title, rulesArray, rulesKey, update }: TextReplaceProps)
const isRegexRules = title === "Using Regex";
async function onClickRemove(index: number) {
+ if (index === rulesArray.length - 1) return;
rulesArray.splice(index, 1);
await DataStore.set(rulesKey, rulesArray);