mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +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);
|
setTags(data.tags);
|
||||||
setArticle(data.article);
|
setArticle(data.article);
|
||||||
setImages(data.images.map((i) => i.id));
|
setImages(data.images.map((i) => i.id));
|
||||||
setLinks(data.links);
|
setLinks(data.links ?? []);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
} else {
|
} else {
|
||||||
showToast({ message: t("Failed to load resource"), type: "error" });
|
showToast({ message: t("Failed to load resource"), type: "error" });
|
||||||
|
Reference in New Issue
Block a user