From 7c2ab8fab719a5f2d48ad93d3595cc68477ff7a2 Mon Sep 17 00:00:00 2001 From: resat <134881341+resatyavcin@users.noreply.github.com> Date: Sun, 18 Feb 2024 19:09:27 +0300 Subject: [PATCH] chore: add optional chaining for collections (#66) Co-authored-by: Onur --- src/app/bookmarks/layout.js | 2 +- src/app/bookmarks/page.js | 2 +- src/lib/utils.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/bookmarks/layout.js b/src/app/bookmarks/layout.js index 8bd7922a..8bc6787b 100644 --- a/src/app/bookmarks/layout.js +++ b/src/app/bookmarks/layout.js @@ -22,7 +22,7 @@ export default async function BookmarksLayout({ children }) { }>
- {collections.map((collection) => { + {collections?.map((collection) => { return (
- {collections.map((collection) => { + {collections?.map((collection) => { return ( { - return arr.sort((a, b) => { + return arr?.sort((a, b) => { const itemA = a[prop].toUpperCase() const itemB = b[prop].toUpperCase()