mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 06:44:13 +00:00
Merge pull request #1247 from responsively-org/extension-bug-fix
Extension deep link bug fix
This commit is contained in:
commit
f3fcc67a12
1 changed files with 5 additions and 1 deletions
|
@ -232,7 +232,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;
|
||||
|
|
Loading…
Reference in a new issue