File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1221,8 +1221,8 @@ public function action_wp_enqueue_scripts() {
1221
1221
'_inc/build/photon/photon.min.js ' ,
1222
1222
'modules/photon/photon.js '
1223
1223
),
1224
- array ( ' wp-dom-ready ' ),
1225
- 20190901 ,
1224
+ array (),
1225
+ 20191001 ,
1226
1226
true
1227
1227
);
1228
1228
}
Original file line number Diff line number Diff line change 44
44
/**
45
45
* Check both when page loads, and when IS is triggered.
46
46
*/
47
- if ( typeof window !== 'undefined' ) {
48
- window . wp . domReady ( restore_dims ) ;
47
+ if ( typeof window !== 'undefined' && typeof document !== 'undefined' ) {
48
+ // `DOMContentLoaded` may fire before the script has a chance to run
49
+ if ( document . readyState === 'loading' ) {
50
+ document . addEventListener ( 'DOMContentLoaded' , restore_dims ) ;
51
+ } else {
52
+ restore_dims ( ) ;
53
+ }
49
54
}
50
55
51
56
document . body . addEventListener ( 'post-load' , restore_dims ) ;
You can’t perform that action at this time.
0 commit comments