Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const App = React.memo(({ root, isMasterDetail }) => {
const navTheme = navigationTheme(theme);

React.useEffect(() => {
const state = Navigation.navigationRef.current.getRootState();
const state = Navigation.navigationRef.current?.getRootState();
const currentRouteName = getActiveRouteName(state);
Navigation.routeNameRef.current = currentRouteName;
setCurrentScreen(currentRouteName);
Expand Down
2 changes: 1 addition & 1 deletion app/containers/InAppNotification/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const INAPP_NOTIFICATION_EMITTER = 'NotificationInApp';
const InAppNotification = memo(() => {
const show = (notification) => {
const { payload } = notification;
const state = Navigation.navigationRef.current.getRootState();
const state = Navigation.navigationRef.current?.getRootState();
const route = getActiveRoute(state);
if (payload.rid) {
if (route?.name === 'RoomView' && route.params?.rid === payload.rid) {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/MessageBox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class MessageBox extends Component {
console.log('Messagebox.didMount: Thread not found');
}
} else if (!sharing) {
msg = this.room.draftMessage;
msg = this.room?.draftMessage;
}
} catch (e) {
log(e);
Expand Down
2 changes: 1 addition & 1 deletion app/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class Root extends React.Component {
this.setState({ root: 'outside' });
}

const state = Navigation.navigationRef.current.getRootState();
const state = Navigation.navigationRef.current?.getRootState();
const currentRouteName = getActiveRouteName(state);
Navigation.routeNameRef.current = currentRouteName;
setCurrentScreen(currentRouteName);
Expand Down