File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,13 @@ export class Utils {
37
37
* @returns Suffixed url
38
38
*/
39
39
public static getDataApiUrl ( settings : object ) : string {
40
- const [ backendUrl , dataApiUrl , directDataApi ] = [
41
- settings [ SettingNames . backendUrl ] ,
42
- settings [ SettingNames . dataApiUrl ] ,
43
- settings [ SettingNames . directDataApi ]
44
- ] ;
40
+ if ( ! settings ) {
41
+ return undefined ;
42
+ }
43
+ const directDataApi = settings [ SettingNames . directDataApi ] ;
44
+ const dataApiUrl = settings [ SettingNames . dataApiUrl ] ;
45
+ const backendUrl = settings [ SettingNames . backendUrl ] ;
46
+
45
47
return directDataApi ? dataApiUrl : `${ ensureTrailingSlash ( backendUrl ) } developer` ;
46
48
}
47
49
@@ -576,7 +578,7 @@ export class Utils {
576
578
if ( ! featureFlags || ! featureFlags . has ( featureFlagName ) ) {
577
579
return false ;
578
580
}
579
-
581
+
580
582
return featureFlags . get ( featureFlagName ) == true ;
581
583
} catch ( error ) {
582
584
logger ?. trackEvent ( "FeatureFlag" , { message : "Feature flag check failed" , data : error . message } ) ;
Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ async function generateWebpackConfig() {
85
85
{ from : `./src/config.design.json` , to : `./config.json` } ,
86
86
{ from : `./src/themes/designer/assets/index.html` , to : "index.html" } ,
87
87
{ from : `./src/themes/designer/styles/fonts` , to : "editors/styles/fonts" } ,
88
- { from : `./templates/default.json` , to : "editors/templates/default.json" }
88
+ { from : `./templates/default.json` , to : "editors/templates/default.json" } ,
89
+ { from : `./templates/default-old.json` , to : "editors/templates/default-old.json" }
89
90
]
90
91
} ) ,
91
92
new webpack . ProvidePlugin ( { Buffer : [ "buffer" , "Buffer" ] } ) ,
Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ async function generateWebpackConfig() {
88
88
patterns : [
89
89
{ from : `./src/config.publish.json` , to : `config.json` } ,
90
90
{ from : `./src/config.runtime.json` , to : `assets/config.json` } ,
91
- { from : `./templates/default.json` , to : "editors/templates/default.json" }
91
+ { from : `./templates/default.json` , to : "editors/templates/default.json" } ,
92
+ { from : `./templates/default-old.json` , to : "editors/templates/default-old.json" }
92
93
]
93
94
} ) ,
94
95
new webpack . ProvidePlugin ( { Buffer : [ 'buffer' , 'Buffer' ] } ) ,
You can’t perform that action at this time.
0 commit comments