Add safe navigation to billboard.js conditionals (#20769)

This commit is contained in:
Ben Halpern 2024-03-13 10:29:13 -04:00 committed by GitHub
parent f572275c9d
commit a22172ec20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}