chore: fix wrong assert message in rewriteCookies (#8797)

This commit is contained in:
houmingjie 2021-09-09 17:22:02 +08:00 committed by GitHub
parent cfeadcdd52
commit fb1b887135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}"`);