mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 00:12:11 +08:00
improve compatibility
This commit is contained in:
+1
-1
@@ -196,7 +196,7 @@ export function replaceAll(value: string, originalValue: string, targetValue: st
|
||||
// rather than as special regex symbols.
|
||||
const escapedOriginalValue = originalValue.replace(/([.*+?^=!:${}()|\-/\\])/g, '\\$1');
|
||||
|
||||
return value.replaceAll(new RegExp(escapedOriginalValue, 'g'), targetValue);
|
||||
return value.replace(new RegExp(escapedOriginalValue, 'g'), targetValue);
|
||||
}
|
||||
|
||||
export function removeAll(value: string, originalValue: string): string {
|
||||
|
||||
Reference in New Issue
Block a user