Skip to content

Commit cad4a95

Browse files
committed
Handle notFoundPage 404 content
1 parent a2539a6 commit cad4a95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/render/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ export function Render(Base) {
308308
_renderMain(text, opt = {}, next) {
309309
const { response } = this.route;
310310

311-
// Note: It is possible for the response to be undefined in envrionments
311+
// Note: It is possible for the response to be undefined in environments
312312
// where XMLHttpRequest has been modified or mocked
313-
if (response && !response.ok) {
313+
if (response && !response.ok && (!text || response.status !== 404)) {
314314
text = `# ${response.status} - ${response.statusText}`;
315315
}
316316

0 commit comments

Comments
 (0)