diff --git a/src/utils/patches.ts b/src/utils/patches.ts index 855432cc..5411ff37 100644 --- a/src/utils/patches.ts +++ b/src/utils/patches.ts @@ -26,7 +26,7 @@ export function canonicalizeMatch(match: T): T { const isStr = typeof match === "string"; return /^[\d]/.test(hashed) || !/^[\w$]+$/.test(hashed) - ? isStr ? `["${hashed}` : String.raw`(?:\["${hashed}"\])` + ? isStr ? `["${hashed}` : String.raw`(?:\["${hashed})` : isStr ? `.${hashed}` : String.raw`(?:\.${hashed})`; });