Skip to content

Commit

Permalink
Handling a change in the way browser extension urls are being passed now
Browse files Browse the repository at this point in the history
  • Loading branch information
manojVivek committed Jun 7, 2024
1 parent 1bf5835 commit 9413667
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion desktop-app/src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ const createWindow = async () => {
};

app.on('open-url', async (event, url) => {
const actualURL = url.replace(`${PROTOCOL}://`, '');
let actualURL = url.replace(`${PROTOCOL}://`, '');
if (actualURL.indexOf('//') !== -1 && actualURL.indexOf('://') === -1) {
// This hack is needed because the URL from the extension is missing the colon for some reason.
actualURL = actualURL.replace('//', '://');
}
if (mainWindow == null) {
// Will be handled by opened window
urlToOpen = actualURL;
Expand Down

0 comments on commit 9413667

Please sign in to comment.