Uncaught SyntaxError: Unexpected token 'if' (at

Created on 5 October 2023, 9 months ago
Updated 12 April 2024, 3 months ago

Problem/Motivation

Getting error in browser console.
Uncaught SyntaxError: Unexpected token 'if' (at 31:907:1)

When opening the file then error is as below code. Also check attached screenshot.

var hideMobile = 
if (hideMobile === 1) {
  document.getElementById('tbm-main').classList.add('tbm--mobile-hide')
}

Steps to reproduce

Enabled module and create megamenu for main navigation. Now assign block in region and save. The error will show on console.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇳India ravi kant Jaipur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024