File tree 3 files changed +6
-1
lines changed
3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,9 @@ export default {
115
115
},
116
116
},
117
117
mounted () {
118
- this .jsonData = this .config ;
118
+ const jsonData = { ... this .config };
119
+ jsonData .sections = jsonData .sections .map (({ filteredItems, ... section }) => section);
120
+ this .jsonData = jsonData;
119
121
if (! this .allowWriteToDisk ) this .saveMode = ' local' ;
120
122
},
121
123
methods: {
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ export default {
94
94
const raw = rawAppConfig;
95
95
const isEmptyObject = (obj ) => (typeof obj === ' object' && Object .keys (obj).length === 0 );
96
96
const isEmpty = (value ) => (value === undefined || isEmptyObject (value));
97
+
97
98
// Delete empty values
98
99
Object .keys (raw).forEach (key => {
99
100
if (isEmpty (raw[key])) delete raw[key];
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ export default {
24
24
const isSubPag = ! ! this . $store . state . currentConfigInfo ;
25
25
const jsonConfig = config ;
26
26
if ( isSubPag ) delete jsonConfig . appConfig ;
27
+ jsonConfig . sections = jsonConfig . sections . map ( ( { filteredItems, ...section } ) => section ) ;
28
+
27
29
// 2. Convert JSON into YAML
28
30
const yamlOptions = { } ;
29
31
const strjsonConfig = JSON . stringify ( jsonConfig ) ;
You can’t perform that action at this time.
0 commit comments