diff --git a/src/wp-includes/js/wp-emoji.js b/src/wp-includes/js/wp-emoji.js
index 0ff3c6f..3867ace 100644
|
a
|
b
|
|
| 30 | 30 | */ |
| 31 | 31 | replaceEmoji = false, |
| 32 | 32 | |
| 33 | | isIE8 = window.navigator.userAgent.indexOf( 'IE 8' ) !== -1, |
| | 33 | isLegacyIE = (window.navigator.userAgent.indexOf( 'IE 8' ) !== -1) || (window.navigator.userAgent.indexOf( 'IE 9' ) !== -1) || (window.navigator.userAgent.indexOf( 'IE 10' ) !== -1), |
| 34 | 34 | |
| 35 | 35 | // Private |
| 36 | 36 | twemoji, timer, |
| … |
… |
|
| 42 | 42 | * @since 4.2.0 |
| 43 | 43 | */ |
| 44 | 44 | function load() { |
| 45 | | if ( typeof window.twemoji === 'undefined' ) { |
| | 45 | if( ( typeof window.twemoji === 'undefined' ) || ( document.body === null ) || ( typeof document.body === 'undefined' ) ){ |
| 46 | 46 | // Break if waiting for longer than 30 sec. |
| 47 | 47 | if ( count > 600 ) { |
| 48 | 48 | return; |
| … |
… |
|
| 134 | 134 | |
| 135 | 135 | // Load when the readyState changes to 'interactive', not 'complete'. |
| 136 | 136 | function onLoad() { |
| 137 | | if ( ( ! isIE8 && 'interactive' === document.readyState ) || ( isIE8 && 'complete' === document.readyState ) ) { |
| | 137 | if ( ( ! isLegacyIE && 'interactive' === document.readyState ) || ( isLegacyIE && 'complete' === document.readyState ) ) { |
| 138 | 138 | load(); |
| 139 | 139 | } |
| 140 | 140 | } |
| … |
… |
|
| 147 | 147 | supportsFlagEmoji = window._wpemojiSettings.supports.flag; |
| 148 | 148 | replaceEmoji = ! supportsEmoji || ! supportsFlagEmoji; |
| 149 | 149 | |
| 150 | | if ( ( ! isIE8 && 'loading' === document.readyState ) || ( isIE8 && 'complete' !== document.readyState ) ) { |
| | 150 | if ( ( ! isLegacyIE && 'loading' === document.readyState ) || ( isLegacyIE && 'complete' !== document.readyState ) ) { |
| 151 | 151 | if ( document.addEventListener ) { |
| 152 | 152 | document.addEventListener( 'readystatechange', onLoad, false ); |
| 153 | 153 | } else if ( document.attachEvent ) { |