Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

handle insets are null

ammarahm-ed55c1049c8ff1
diff --git a/apps/mobile/src/components/Container/index.js b/apps/mobile/src/components/Container/index.js
index a0f613ca2..2c263d01c 100644
--- a/apps/mobile/src/components/Container/index.js
+++ b/apps/mobile/src/components/Container/index.js
@@ -12,7 +12,7 @@ export const Container = ({children, root}) => {
<SafeAreaView
style={{
height: '100%',
- paddingTop: initialWindowMetrics.insets.top,
+ paddingTop: initialWindowMetrics.insets.top || 0,
}}>
<SelectionHeader />
<ContainerTopSection root={root} />
diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.js
index f8d186f32..2d8f961b1 100644
--- a/apps/mobile/src/components/SimpleList/index.js
+++ b/apps/mobile/src/components/SimpleList/index.js
@@ -204,8 +204,8 @@ const SimpleList = ({
? 130
: 130 - 60
: listData[0] && !selectionMode
- ? 155 - initialWindowMetrics.insets.top
- : (155 - initialWindowMetrics.insets.top) - 60,
+ ? 155 - initialWindowMetrics?.insets?.top
+ : (155 - initialWindowMetrics?.insets?.top) - 60,
};
}, [selectionMode, listData, colors]);