Skip to content

Commit 45c80f0

Browse files
Fix leading / trailing /
1 parent 5f51c04 commit 45c80f0

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Blazor.PWA.MSBuild.Tasks/build/BlazorPWA.MSBuild.Manifest.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
<!-- Base URL for the app -->
1515
<ManifestBaseUrl Condition="'$(ManifestBaseUrl)' == ''">/</ManifestBaseUrl>
16+
<ManifestBaseUrl Condition="!'$(ManifestBaseUrl.StartsWith(/)'">/$(ManifestBaseUrl)</ManifestBaseUrl>
17+
<ManifestBaseUrl Condition="!'$(ManifestBaseUrl.EndsWith(/)'">$(ManifestBaseUrl)/</ManifestBaseUrl>
1618

1719
<!-- Please see https://developers.google.com/web/fundamentals/web-app-manifest/#display for options -->
1820
<ManifestDisplay Condition="'$(ManifestDisplay)' == ''">standalone</ManifestDisplay>

Blazor.PWA.MSBuild.Tasks/build/BlazorPWA.MSBuild.ServiceWorkerRegister.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<ServiceWorkerBlazorInstallMethod Condition="'$(ServiceWorkerBlazorInstallMethod)'==''">PWAInstallable</ServiceWorkerBlazorInstallMethod>
3535
<!-- Setup the declarations for the Service Worker Register -->
3636
<ServiceWorkerRegisterConstants Condition="'$(ServiceWorkerRegisterConstants)' == ''">
37-
const serviceWorkerFileName = '$(ServiceWorkerBaseURL)$(ServiceWorkerFileName)'%3B;
37+
const serviceWorkerFileName = '$(ServiceWorkerBaseUrl)$(ServiceWorkerFileName)'%3B;
3838
const swInstalledEvent = '$(ServiceWorkerInstalledEvent)'%3B;
3939
const staticCachePrefix = '$(ServiceWorkerCacheName)-v'%3B;
4040
const updateAlertMessage = '$(ServiceWorkerUpdateAlertText)'%3B;

Blazor.PWA.MSBuild.Tasks/build/BlazorPWA.MSBuild.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
<!-- The "home route" url for the application -->
3030
<ServiceWorkerBaseUrl Condition="'$(ServiceWorkerBaseUrl)' == ''">/</ServiceWorkerBaseUrl>
31+
<ServiceWorkerBaseUrl Condition="!'$(ServiceWorkerBaseUrl.StartsWith(/)'">/$(ServiceWorkerBaseUrl)</ServiceWorkerBaseUrl>
32+
<ServiceWorkerBaseUrl Condition="!'$(ServiceWorkerBaseUrl.EndsWith(/)'">$(ServiceWorkerBaseUrl)/</ServiceWorkerBaseUrl>
3133

3234
<!-- The CSB home page served up for the base URL -->
3335
<ProjectIndexPage Condition="'$(ProjectIndexPage)' == ''">index.html</ProjectIndexPage>

0 commit comments

Comments
 (0)