File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -401,20 +401,17 @@ export default {
401401 return null
402402 }
403403 const details = this .dataResource [detailsKey]
404- if (! details || Object . keys ( details). length === 0 ) {
404+ if (! details || typeof details !== ' object ' ) {
405405 return null
406406 }
407407 const prefix = ' External:'
408- if (details && typeof details === ' object' && Object .keys (details).length > 0 ) {
409- const result = {}
410- for (const key in details) {
411- if (key .startsWith (prefix)) {
412- result[key .substring (prefix .length )] = details[key]
413- }
408+ const result = {}
409+ for (const key in details) {
410+ if (key .startsWith (prefix)) {
411+ result[key .substring (prefix .length )] = details[key]
414412 }
415- return result
416413 }
417- return null
414+ return Object . keys (result). length > 0 ? result : null
418415 }
419416 },
420417 created () {
You can’t perform that action at this time.
0 commit comments