Skip to content

Commit

Permalink
Merge pull request #3661 from balena-io/fix-windows-open-from-web
Browse files Browse the repository at this point in the history
patch: fixed open from browser on windows
  • Loading branch information
bulldozer-balena[bot] authored Dec 21, 2021
2 parents b938132 + ef90d04 commit c6126a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/gui/etcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const sourceSelectorReady = new Promise((resolve) => {
async function selectImageURL(url?: string) {
// 'data:,' is the default chromedriver url that is passed as last argument when running spectron tests
if (url !== undefined && url !== 'data:,') {
url = url.replace(/\/$/, ''); // on windows the url ends with an extra slash
url = url.startsWith(scheme) ? url.slice(scheme.length) : url;
await sourceSelectorReady;
electron.BrowserWindow.getAllWindows().forEach((window) => {
Expand Down

0 comments on commit c6126a9

Please sign in to comment.