Fix js error
Merge pull request #4662 from colemanw/entityRefFix

Fix js error