diff --git a/core/client/views/blog.js b/core/client/views/blog.js index ea2764e6db..aaebe7fe5d 100644 --- a/core/client/views/blog.js +++ b/core/client/views/blog.js @@ -256,7 +256,7 @@ $(e.currentTarget).attr('target', '_blank'); }); - if (this.model !== 'undefined') { + if (this.model !== undefined) { this.addSubview(new Ghost.View.PostSettings({el: $('.post-controls'), model: this.model})).render(); } diff --git a/core/server/middleware/index.js b/core/server/middleware/index.js index fd703b1114..9a0b8a70e6 100644 --- a/core/server/middleware/index.js +++ b/core/server/middleware/index.js @@ -166,7 +166,7 @@ function redirectToSignup(req, res, next) { function redirectSSL(req, res, next) { // Check if X-Forarded-Proto headers are sent, if they are check for https. If they are not assume true to avoid infinite redirect loop. // If the X-Forwarded-Proto header is missing and Express cannot automatically sense HTTPS the redirect will not be made. - var httpsHeader = req.header('X-Forwarded-Proto') !== 'undefined' ? req.header('X-Forwarded-Proto').toLowerCase() === 'https' ? true : false : true; + var httpsHeader = req.header('X-Forwarded-Proto') !== undefined ? req.header('X-Forwarded-Proto').toLowerCase() === 'https' ? true : false : true; if (!req.secure && !httpsHeader) { return res.redirect(301, url.format({ protocol: 'https:',