mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
fix: handle potential null links in KunFiles component
This commit is contained in:
@@ -1446,7 +1446,7 @@ function DeleteFileDialog({
|
||||
|
||||
function KunFiles({ resource }: { resource: ResourceDetails }) {
|
||||
let vnid = "";
|
||||
for (const link of resource.links) {
|
||||
for (const link of (resource.links ?? [])) {
|
||||
if (link.label.toLowerCase() === "vndb") {
|
||||
vnid = link.url.split("/").pop() || "";
|
||||
break;
|
||||
|
Reference in New Issue
Block a user