From cfa024c76003e678f87ea384d5ccdd6c51645220 Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Mon, 11 Apr 2022 02:24:40 +1000 Subject: [PATCH] avoid potential issue --- helpers/dynamic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/dynamic.js b/helpers/dynamic.js index 899026fe..3c040e05 100644 --- a/helpers/dynamic.js +++ b/helpers/dynamic.js @@ -5,7 +5,7 @@ module.exports = (req, res, code, page, data) => { if (req.body.minimal) { data.minimal = true; } - if (req.headers['x-using-xhr'] != null) { + if (req.headers && req.headers['x-using-xhr'] != null) { //if sending header with js, and not a bypass_minimal page, show modal return res.json(data); } else {