1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-13 22:12:50 +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,14 +527,14 @@ 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',
});
}
@@ -642,6 +642,7 @@ const mapStateToProps = (state) => {
syncStarted: state.syncStarted,
appState: state.appState,
noteSelectionEnabled: state.noteSelectionEnabled,
selectedFolderId: state.selectedFolderId,
};
};