This was causing console warnings in some browsers. Merges [45310] to the 5.2 branch. Props aduth, joen, afercia, timph, ianbelanger. Fixes #47183. Built from https://develop.svn.wordpress.org/branches/5.2@45312 git-svn-id: http://core.svn.wordpress.org/branches/5.2@45123 1a063a9b-81f0-0310-95a4-ce76da25c4cd