mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +00:00
Fix links initialization to handle undefined values in resource editing
This commit is contained in:
@@ -54,7 +54,7 @@ export default function EditResourcePage() {
|
||||
setTags(data.tags);
|
||||
setArticle(data.article);
|
||||
setImages(data.images.map((i) => i.id));
|
||||
setLinks(data.links);
|
||||
setLinks(data.links ?? []);
|
||||
setLoading(false);
|
||||
} else {
|
||||
showToast({ message: t("Failed to load resource"), type: "error" });
|
||||
|
||||
Reference in New Issue
Block a user