Skip to content

Commit

Permalink
Merge pull request #1285 from void-mAlex/relative-app-rootURL-workaround
Browse files Browse the repository at this point in the history
handle special case where rootURL is empty string
  • Loading branch information
ef4 authored Dec 6, 2022
2 parents cbda288 + 2a84207 commit de5b155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compat/src/v1-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,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);
Expand Down

0 comments on commit de5b155

Please sign in to comment.