File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
artifacts-ui/src/components Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -392,10 +392,10 @@ export default {
392
392
},
393
393
initVariableTableData (index ) {
394
394
this .currentFileIndex = index
395
- if (this .currentDiffConfigTab === ' DB' ) {
395
+ if (this .currentDiffConfigTab === ' DB' && this . packageDetail . db_diff_conf_file . length > 0 ) {
396
396
this .typeChange (this .packageDetail .db_diff_conf_file [index].configKeyInfos || [])
397
397
}
398
- if (this .currentDiffConfigTab === ' APP' ) {
398
+ if (this .currentDiffConfigTab === ' APP' && this . packageDetail . diff_conf_file . length > 0 ) {
399
399
this .typeChange (this .packageDetail .diff_conf_file [index].configKeyInfos || [])
400
400
}
401
401
},
@@ -411,12 +411,15 @@ export default {
411
411
this .prefixType = ' '
412
412
this .$nextTick (() => {
413
413
const tmp = this .currentDiffConfigTab === this .constPackageOptions .db ? ' db_diff_conf_file' : ' diff_conf_file'
414
- const tmpData = this .packageDetail [tmp].find (item => item .filename === this .activeTab ).configKeyInfos || []
415
- for (let i = 0 ; i < this .variablePrefixType .length ; i++ ) {
416
- const res = this .getNum (tmpData, this .variablePrefixType [i].filterKey )
417
- if (res > 0 ) {
418
- this .prefixType = this .variablePrefixType [i].key
419
- break
414
+ const find = this .packageDetail [tmp].find (item => item .filename === this .activeTab )
415
+ if (find) {
416
+ const tmpData = find .configKeyInfos || []
417
+ for (let i = 0 ; i < this .variablePrefixType .length ; i++ ) {
418
+ const res = this .getNum (tmpData, this .variablePrefixType [i].filterKey )
419
+ if (res > 0 ) {
420
+ this .prefixType = this .variablePrefixType [i].key
421
+ break
422
+ }
420
423
}
421
424
}
422
425
})
You can’t perform that action at this time.
0 commit comments