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() {
3232 . then ( importL10n )
3333 . then ( configureLocale ) // Configure locale before loading modules with strings
3434 . then ( loadApiFetch )
35- . then ( configureNetworkingUtils ) // Configure AJAX and api-fetch before loading remaining modules
35+ . then ( configureApiFetch ) // Configure api-fetch before loading remaining modules
3636 . then ( loadRemainingAssets )
3737 . then ( initializeEditor )
3838 . catch ( handleError ) ;
@@ -61,19 +61,21 @@ function loadRemainingAssets() {
6161 } ) ;
6262}
6363
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+ ) ;
7171}
7272
7373function initializeEditor ( assetsResult ) {
7474 const { allowedBlockTypes } = assetsResult ;
7575 return import ( './editor' ) . then (
7676 ( { initializeEditor : _initializeEditor } ) => {
77+ configureAjax ( ) ;
78+
7779 _initializeEditor ( { allowedBlockTypes } ) ;
7880 }
7981 ) ;
You can’t perform that action at this time.
0 commit comments