Shouldn't this be `if (newTab)`?