From f5487ca3c8223bcc93225b02dc404a74ffe5ed20 Mon Sep 17 00:00:00 2001 From: Guilherme da Silva Benevides Date: Fri, 15 Nov 2024 16:41:26 -0300 Subject: [PATCH] remove window to Deno 2 --- vtex/hooks/useCart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vtex/hooks/useCart.ts b/vtex/hooks/useCart.ts index 0d35d45bc..796fbcad5 100644 --- a/vtex/hooks/useCart.ts +++ b/vtex/hooks/useCart.ts @@ -57,7 +57,7 @@ export const itemToAnalyticsItem = ( item_name: item.name ?? item.skuName ?? "", item_variant: item.skuName, item_brand: item.additionalInfo.brandName ?? "", - item_url: new URL(item.detailUrl, globalThis.window.location.href).href, + item_url: new URL(item.detailUrl, globalThis.location.href).href, ...(mapItemCategoriesToAnalyticsCategories(item)), });