This line (and the var menuItemID declaration) could be moved inside the `if` statement on line 423.