68
68
}"
69
69
:style =" { ...tooltipPos, opacity: tooltipOpacity }"
70
70
>
71
- <div class =" section border-b mx-4" >
71
+ <div class =" section mx-4" >
72
72
<p class =" key" >
73
73
Repository
74
74
</p >
75
75
<p class =" break-words font-medium text-black" >
76
76
{{ nodes[targetNodeId]?.fullName ?? '' }}
77
77
</p >
78
78
</div >
79
- <div class =" section border-b mx-4" >
79
+ <div class =" section border-t mx-4" >
80
80
<p class =" key" >
81
81
Contributions
82
82
</p >
83
83
<p class =" text-sm text-gray-900" >
84
84
{{ nodes[targetNodeId]?.numberCommits ?? '' }}
85
85
</p >
86
86
</div >
87
- <div class =" section ml-4" >
87
+ <div v-if = " nodes[targetNodeId]?.topics?.length " class =" section ml-4 border-t " >
88
88
<p class =" key" >
89
89
Topics
90
90
</p >
91
91
<div class =" flex flex-wrap h-24 overflow-y-scroll pr-4" >
92
92
<div
93
- v-for =" topic in nodes[targetNodeId]? .topics ?? [] "
93
+ v-for =" topic in nodes[targetNodeId].topics"
94
94
:key =" topic"
95
95
class =" topic"
96
96
>
@@ -321,7 +321,7 @@ const nodes = computed(() => {
321
321
nodeList[name].size = size;
322
322
nodeList[name].numberCommits += contribution .numberCommits ;
323
323
nodeList[name].topics = [
324
- ... new Set ([... nodeList[name].topics , ... contribution .topics ]),
324
+ ... new Set ([... ( nodeList[name].topics || []) , ... ( contribution .topics || []) ]),
325
325
];
326
326
}
327
327
});
@@ -341,13 +341,16 @@ const edges = computed(() => {
341
341
props .contributions .forEach ((contribution ) => {
342
342
// Extract the name of the contribution from the URL
343
343
const name = contribution .url .split (' /' ).pop ();
344
- contribution .topics .forEach ((topic ) => {
345
- if (! topicMap[topic]) {
346
- topicMap[topic] = [name];
347
- } else {
348
- topicMap[topic].push (name);
349
- }
350
- });
344
+
345
+ if (contribution .topics ) {
346
+ contribution .topics .forEach ((topic ) => {
347
+ if (! topicMap[topic]) {
348
+ topicMap[topic] = [name];
349
+ } else {
350
+ topicMap[topic].push (name);
351
+ }
352
+ });
353
+ }
351
354
});
352
355
353
356
// Next, the topics in the topicMap are iterated over and for each topic,
@@ -542,7 +545,7 @@ const eventHandlers = {
542
545
};
543
546
< / script>
544
547
545
- < style lang= " css " scoped>
548
+ < style lang= " scss " scoped>
546
549
.tooltip {
547
550
top: 0 ;
548
551
left: 0 ;
0 commit comments