From 2a842071a8b6779ca0a20dfad3e35ad96d393f23 Mon Sep 17 00:00:00 2001 From: void_malex Date: Tue, 15 Nov 2022 16:45:56 +0000 Subject: [PATCH] possible fix for https://github.com/embroider-build/embroider/issues/1279 --- packages/compat/src/v1-app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compat/src/v1-app.ts b/packages/compat/src/v1-app.ts index 3e13192ad..aaf8cbc81 100644 --- a/packages/compat/src/v1-app.ts +++ b/packages/compat/src/v1-app.ts @@ -664,7 +664,7 @@ export default class V1App { private withoutRootURL(src: string) { let rootURL = this.config.readConfig().rootURL; - if (src.startsWith(rootURL)) { + if ((src.startsWith(rootURL) && rootURL) || (!rootURL && !src.startsWith('/'))) { src = '/' + src.slice(rootURL.length); } else if (src.startsWith('/' + rootURL)) { src = src.slice(rootURL.length);