From cbec1e3dd3fc00da125d93e15b5d474d0715fd7d Mon Sep 17 00:00:00 2001 From: eps1lon Date: Sat, 20 Apr 2024 21:59:04 +0200 Subject: [PATCH] /errors: Empty args are not missing arguments e.g. the hydration diff will always produce `/errors/418?args[]=` in prod because prod doesn't have diffs. --- src/components/MDX/ErrorDecoder.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MDX/ErrorDecoder.tsx b/src/components/MDX/ErrorDecoder.tsx index 198aa939d7b..b04fa9f7987 100644 --- a/src/components/MDX/ErrorDecoder.tsx +++ b/src/components/MDX/ErrorDecoder.tsx @@ -11,7 +11,7 @@ function replaceArgs( return msg.replace(/%s/g, function () { const arg = argList[argIdx++]; // arg can be an empty string: ?args[0]=&args[1]=count - return arg === undefined || arg === '' ? replacer : arg; + return arg === undefined ? replacer : arg; }); }