File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export function initializeRemoteEditor() {
32
32
. then ( importL10n )
33
33
. then ( configureLocale ) // Configure locale before loading modules with strings
34
34
. then ( loadApiFetch )
35
- . then ( configureNetworkingUtils ) // Configure AJAX and api-fetch before loading remaining modules
35
+ . then ( configureApiFetch ) // Configure api-fetch before loading remaining modules
36
36
. then ( loadRemainingAssets )
37
37
. then ( initializeEditor )
38
38
. catch ( handleError ) ;
@@ -61,19 +61,21 @@ function loadRemainingAssets() {
61
61
} ) ;
62
62
}
63
63
64
- function configureNetworkingUtils ( assetsResult ) {
65
- configureAjax ( ) ;
66
-
67
- return import ( './api-fetch' ) . then ( ( { configureApiFetch } ) => {
68
- configureApiFetch ( ) ;
69
- return assetsResult ;
70
- } ) ;
64
+ function configureApiFetch ( assetsResult ) {
65
+ return import ( './api-fetch' ) . then (
66
+ ( { configureApiFetch : _configureApiFetch } ) => {
67
+ _configureApiFetch ( ) ;
68
+ return assetsResult ;
69
+ }
70
+ ) ;
71
71
}
72
72
73
73
function initializeEditor ( assetsResult ) {
74
74
const { allowedBlockTypes } = assetsResult ;
75
75
return import ( './editor' ) . then (
76
76
( { initializeEditor : _initializeEditor } ) => {
77
+ configureAjax ( ) ;
78
+
77
79
_initializeEditor ( { allowedBlockTypes } ) ;
78
80
}
79
81
) ;
You can’t perform that action at this time.
0 commit comments