JavaScript: Improved condition for outlining.