From ace47d4c3045c3523be628b37165a290796926ab Mon Sep 17 00:00:00 2001 From: Nikhil Kothari Date: Tue, 26 Dec 2023 16:12:06 -0800 Subject: [PATCH] Update client.js Switch from string.indexOf to string.includes. --- packages/integrations/svelte/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/svelte/client.js b/packages/integrations/svelte/client.js index 4916f8105a46..51d60ac8fcb2 100644 --- a/packages/integrations/svelte/client.js +++ b/packages/integrations/svelte/client.js @@ -112,7 +112,7 @@ function filteredConsoleWarning(msg, ...rest) { const isKnownSvelteError = msg.endsWith("was created with unknown prop 'class'") || - msg.indexOf("was created with unknown prop 'data-astro-cid") > 0; + msg.includes("was created with unknown prop 'data-astro-cid"); if (isKnownSvelteError) return; } originalConsoleWarning(msg, ...rest);