FIX: ensures static pages are using absolute path (#7828)
This commit is contained in:
parent
11ae5c78db
commit
384f5cea05
|
@ -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 }))
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue