Fix JS error on pages without tabs.