Skip to content

Commit

Permalink
Fix server not opening URLs (#189)
Browse files Browse the repository at this point in the history
* Server fix

* Update public/electron.js

---------

Co-authored-by: Kamran Ahmed <[email protected]>
  • Loading branch information
piotreknow02 and kamranahmedse authored Mar 8, 2023
1 parent a3f2a23 commit a60a629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function checkAndDownloadUpdate() {
function listenUrlLoader() {
const server = http.createServer((request, response) => {
let target_url = url.parse(request.url, true).query.url;
target_url = Array.isArray(target_url) ? target_url.pop : '';
target_url = Array.isArray(target_url) ? target_url.pop() : target_url;

if (target_url) {
mainWindow.webContents.send('url.requested', target_url);
Expand Down

0 comments on commit a60a629

Please sign in to comment.