Skip to content

Commit

Permalink
Support converting file urls starting by / (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Jan 9, 2019
1 parent 0d4f1f2 commit bea7f84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/www/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ var WebView = {
if (!url) {
return url;
}
if (url.startsWith('/')) {
return window.WEBVIEW_FILE_PREFIX + "://" + url;
}
if (url.startsWith('file://')) {
return url.replace('file', window.WEBVIEW_FILE_PREFIX);
}
Expand Down

0 comments on commit bea7f84

Please sign in to comment.