1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Fix sharing text when no folder exists

This commit is contained in:
Laurent Cozic
2018-09-04 11:07:33 +01:00
parent 50c8f2ae61
commit cea368cd3f

View File

@ -527,17 +527,17 @@ class AppComponent extends React.Component {
try {
const { type, value } = await ShareExtension.data();
if (type != "") {
if (type != "" && this.props.selectedFolderId) {
this.props.dispatch({
type: 'NAV_GO',
routeName: 'Note',
noteId: null,
sharedData: {type: type, value: value},
folderId: this.props.parentFolderId,
folderId: this.props.selectedFolderId,
itemType: 'note',
});
}
}
} catch(e) {
console.log('Error in ShareExtension.data', e);
@ -642,6 +642,7 @@ const mapStateToProps = (state) => {
syncStarted: state.syncStarted,
appState: state.appState,
noteSelectionEnabled: state.noteSelectionEnabled,
selectedFolderId: state.selectedFolderId,
};
};