mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 16:52:45 +08:00
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(
|
||||
/<!-- preload-content: -->((?:.|[\n\r])*)<!-- :preload-content -->/
|
||||
)[1];
|
||||
resolve(StaticPage.create({ path: path, html: text }));
|
||||
resolve(StaticPage.create({ path, html: text }));
|
||||
} else {
|
||||
ajax(path + ".html", { dataType: "html" }).then(function(result) {
|
||||
resolve(StaticPage.create({ path: path, html: result }));
|
||||
});
|
||||
ajax(`/${path}.html`, { dataType: "html" }).then(result =>
|
||||
resolve(StaticPage.create({ path, html: result }))
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user