Skip to content

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

add ? check before alling injectJavascript

ammarahm-ed700ce747b954
diff --git a/apps/mobile/share/index.js b/apps/mobile/share/index.js
index 356d90569..6c8cf9a44 100644
--- a/apps/mobile/share/index.js
+++ b/apps/mobile/share/index.js
@@ -255,7 +255,7 @@ const NotesnookShare = ({quicknote = false}) => {
webviewRef.current?.injectJavaScript(`document
.querySelector('.htmldiff_div')
.setAttribute('contenteditable', 'true');`);
- webviewRef.current.injectJavaScript(`
+ webviewRef.current?.injectJavaScript(`
pageTheme.colors = ${theme};
setTheme();
`);