Merge pull request #1247 from responsively-org/extension-bug-fix

Extension deep link bug fix
This commit is contained in:
Manoj Vivek 2024-06-07 13:10:50 +05:30 committed by GitHub
commit f3fcc67a12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;