fix actionSheet when no note.

This commit is contained in:
ammarahm-ed
2020-03-15 12:29:27 +05:00
parent 7a352cb38f
commit 87d56958e8

View File

@@ -67,7 +67,7 @@ export class DialogManager extends Component {
this.setState(
{
actionSheetData: data,
item: data.item,
item: data.item ? data.item : {},
},
() => {
this.actionSheet._setModalVisible();
@@ -90,7 +90,7 @@ export class DialogManager extends Component {
loadNote = i => {
if (i && i.type === 'new') {
this.setState({
note: {},
item: {},
});
} else {
note = i;
@@ -282,7 +282,7 @@ export class DialogManager extends Component {
: null
}
initialOffsetFromBottom={
DDS.isTab || item.type !== 'note' || item.dateDeleted ? 1 : 0.5
DDS.isTab || item?.type !== 'note' || item.dateDeleted ? 1 : 0.5
}
bounceOnOpen={true}
gestureEnabled={true}