From a914e05f1a1f4e35d0ccbc75458898b5fd5922f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Mon, 15 Apr 2024 17:27:01 +0200 Subject: [PATCH] v2.0.06 Fix `window.Routes` from `routes.ts` auto-generated file --- composer.json | 2 +- src/Typed/Route/TypeRouteListTs.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index ee91693..3bbca44 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kiwilan/typescriptable-laravel", "description": "PHP package for Laravel to type Eloquent models, routes, Spatie Settings with autogenerated TypeScript. If you want to use some helpers with Inertia, you can install associated NPM package.", - "version": "2.0.05", + "version": "2.0.06", "keywords": [ "kiwilan", "laravel", diff --git a/src/Typed/Route/TypeRouteListTs.php b/src/Typed/Route/TypeRouteListTs.php index 9802548..9f650e3 100644 --- a/src/Typed/Route/TypeRouteListTs.php +++ b/src/Typed/Route/TypeRouteListTs.php @@ -58,8 +58,7 @@ interface Window { const appUrl = '{$appUrl}' if (typeof window !== 'undefined') { - if (typeof window !== 'undefined' && typeof window?.Routes !== 'undefined') - window.Routes = Routes + window.Routes = Routes } export { Routes, appUrl }