@vaadin/hilla-frontend
Advanced tools
Comparing version 24.6.0-beta1 to 24.6.0-beta2
@@ -13,3 +13,3 @@ import { ConnectionIndicator, ConnectionState } from "@vaadin/common-frontend"; | ||
} from "./FluxConnection.js"; | ||
const $wnd = window; | ||
const $wnd = globalThis; | ||
$wnd.Vaadin ??= {}; | ||
@@ -114,3 +114,3 @@ $wnd.Vaadin.registrations ??= []; | ||
} | ||
const csrfHeaders = getCsrfTokenHeadersForEndpointRequest(document); | ||
const csrfHeaders = globalThis.document ? getCsrfTokenHeadersForEndpointRequest(globalThis.document) : {}; | ||
const headers = { | ||
@@ -117,0 +117,0 @@ Accept: "application/json", |
@@ -6,3 +6,4 @@ import Cookies from "js-cookie"; | ||
const CookieManager = Cookies.withAttributes({ | ||
path: calculatePath(new URL(document.baseURI)) | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
path: calculatePath(new URL(globalThis.document?.baseURI ?? "/")) | ||
}); | ||
@@ -9,0 +10,0 @@ var CookieManager_default = CookieManager; |
@@ -124,3 +124,3 @@ import atmosphere from "atmosphere.js"; | ||
#connectWebsocket(prefix, atmosphereOptions) { | ||
const extraHeaders = getCsrfTokenHeadersForEndpointRequest(document); | ||
const extraHeaders = globalThis.document ? getCsrfTokenHeadersForEndpointRequest(globalThis.document) : {}; | ||
const pushUrl = "HILLA/push"; | ||
@@ -127,0 +127,0 @@ const url = prefix.length === 0 ? pushUrl : (prefix.endsWith("/") ? prefix : `${prefix}/`) + pushUrl; |
@@ -5,3 +5,3 @@ function __REGISTER__(feature, vaadinObj = window.Vaadin ??= {}) { | ||
is: feature ? `${"@vaadin/hilla-frontend"}/${feature}` : "@vaadin/hilla-frontend", | ||
version: "24.6.0-beta1" | ||
version: "24.6.0-beta2" | ||
}); | ||
@@ -8,0 +8,0 @@ } |
{ | ||
"name": "@vaadin/hilla-frontend", | ||
"version": "24.6.0-beta1", | ||
"version": "24.6.0-beta2", | ||
"description": "Hilla core frontend utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
125566
1281