From a1f0178e4d947c45e6fe6dffefc2130ea4a77d5a Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Fri, 14 Jul 2023 01:00:20 +0900 Subject: [PATCH] (fix) failure on prerender --- components/content/MkIndex.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/content/MkIndex.vue b/components/content/MkIndex.vue index ae2bfc8d..e12f0700 100644 --- a/components/content/MkIndex.vue +++ b/components/content/MkIndex.vue @@ -45,7 +45,7 @@ const findDeepObject = (obj: Record, condition: (v: any) => boolean return obj; } - if (obj.children && obj.children.length > 0) { + if (obj?.children && obj.children.length > 0) { for (let i = 0; i < obj.children.length; i++) { console.log(obj.children[i]); const result = findDeepObject(obj.children[i], condition);