From fb1b8871351b0d9d32b154e818df4a64bed7aef4 Mon Sep 17 00:00:00 2001 From: houmingjie <273338979@qq.com> Date: Thu, 9 Sep 2021 17:22:02 +0800 Subject: [PATCH] chore: fix wrong assert message in rewriteCookies (#8797) --- src/server/network.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/network.ts b/src/server/network.ts index 277de3cd4d..0e1411e634 100644 --- a/src/server/network.ts +++ b/src/server/network.ts @@ -52,7 +52,7 @@ export function rewriteCookies(cookies: types.SetNetworkCookieParam[]): types.Se assert(c.value, 'Cookie should have a value'); assert(c.url || (c.domain && c.path), 'Cookie should have a url or a domain/path pair'); assert(!(c.url && c.domain), 'Cookie should have either url or domain'); - assert(!(c.url && c.path), 'Cookie should have either url or domain'); + assert(!(c.url && c.path), 'Cookie should have either url or path'); const copy = {...c}; if (copy.url) { assert(copy.url !== 'about:blank', `Blank page can not have cookie "${c.name}"`);