From a22172ec201d4cd02d2c64ad5e933fd29edbae26 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Wed, 13 Mar 2024 10:29:13 -0400 Subject: [PATCH] Add safe navigation to billboard.js conditionals (#20769) --- app/javascript/packs/billboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/packs/billboard.js b/app/javascript/packs/billboard.js index 92d028e2d..41c3c7e6b 100644 --- a/app/javascript/packs/billboard.js +++ b/app/javascript/packs/billboard.js @@ -31,7 +31,7 @@ async function generateBillboard(element) { try { // When context is digest we don't show this billboard // This is a hardcoded feature which should become more dynamic later. - if (asyncUrl.includes('post_fixed_bottom') && currentParams.includes('context=digest')) { + if (asyncUrl?.includes('post_fixed_bottom') && currentParams?.includes('context=digest')) { return; }