From 1e478053034d5fe3d657913e22db73f04a200351 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 17 Jun 2024 17:00:43 -0700 Subject: [PATCH] address comment --- packages/playwright-core/src/utils/isomorphic/stringUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playwright-core/src/utils/isomorphic/stringUtils.ts b/packages/playwright-core/src/utils/isomorphic/stringUtils.ts index 21bc2aba48..df213a1085 100644 --- a/packages/playwright-core/src/utils/isomorphic/stringUtils.ts +++ b/packages/playwright-core/src/utils/isomorphic/stringUtils.ts @@ -75,7 +75,7 @@ export function cacheNormalizedWhitespaces() { export function normalizeWhiteSpace(text: string): string { let result = normalizedWhitespaceCache?.get(text); - if (!result) { + if (result === undefined) { result = text.replace(/\u200b/g, '').trim().replace(/\s+/g, ' '); normalizedWhitespaceCache?.set(text, result); }