Skip to content

Commit

Permalink
Passing protocol and port through share links correctly (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdejong authored Jul 25, 2023
1 parent 1a018e2 commit cafc760
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/application/ApplicationThunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,12 @@ export const handleSharedDashboardsThunk = () => (dispatch: any) => {
const database = connection.split('@')[1].split(':')[0];
const url = connection.split('@')[1].split(':')[1];
const port = connection.split('@')[1].split(':')[2];

if (url == password) {
// Special case where a connect link is generated without a password.
// Here, the format is parsed incorrectly and we open the connection window instead.

dispatch(resetShareDetails());
dispatch(setConnectionProperties('neo4j', url, '7687', database, username.split('@')[0], ''));
dispatch(setConnectionProperties(protocol, url, port, database, username.split('@')[0], ''));
dispatch(setWelcomeScreenOpen(false));
dispatch(setConnectionModalOpen(true));
// window.history.pushState({}, document.title, "/");
Expand Down

0 comments on commit cafc760

Please sign in to comment.