FIX: ensures static pages are using absolute path (#7828)

This commit is contained in:
Joffrey JAFFEUX 2019-07-01 11:25:45 +02:00 committed by GitHub
parent 11ae5c78db
commit 384f5cea05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -12,11 +12,11 @@ StaticPage.reopenClass({
text = text.match( text = text.match(
/<!-- preload-content: -->((?:.|[\n\r])*)<!-- :preload-content -->/ /<!-- preload-content: -->((?:.|[\n\r])*)<!-- :preload-content -->/
)[1]; )[1];
resolve(StaticPage.create({ path: path, html: text })); resolve(StaticPage.create({ path, html: text }));
} else { } else {
ajax(path + ".html", { dataType: "html" }).then(function(result) { ajax(`/${path}.html`, { dataType: "html" }).then(result =>
resolve(StaticPage.create({ path: path, html: result })); resolve(StaticPage.create({ path, html: result }))
}); );
} }
}); });
} }