Fix 500 error being thrown on fleetdm.com (#2144)

* update notFound conditional

* Update view-basic-documentation.js
This commit is contained in:
eashaw
2021-09-20 13:29:59 -05:00
committed by GitHub
parent dd31779aac
commit 5eb14e290f
+1 -1
View File
@@ -57,7 +57,7 @@ module.exports = {
let revisedPage = _.find(sails.config.builtStaticContent.markdownPages, {
url: _.trimRight(SECTION_URL_PREFIX + '/' + _.trim(modifiedPageUrlSuffix, '/'), '/')
});
if(revisedPage.url) {
if(revisedPage) {
// If we matched a page with the modified pageUrlSuffix, then redirect to that.
throw {redirect: revisedPage.url};
} else {