From 47258f7b3d36aa747bf1e7c3954e9f6eac986609 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 3 Oct 2018 08:10:22 -0700 Subject: [PATCH] fix: default_app incorrect loading by url (#14940) --- default_app/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/default_app/main.js b/default_app/main.js index d4beff396e54..7dc7c847340f 100644 --- a/default_app/main.js +++ b/default_app/main.js @@ -155,7 +155,11 @@ if (option.file && !option.webdriver) { if (protocol === 'http:' || protocol === 'https:' || protocol === 'file:' || protocol === 'chrome:') { loadApplicationByUrl(file) } else if (extension === '.html' || extension === '.htm') { - loadApplicationByUrl('file://' + path.resolve(file)) + loadApplicationByUrl(url.format({ + protocol: 'file:', + slashes: true, + pathname: path.resolve(file) + })) } else { loadApplicationPackage(file) }