Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #15194 from brave/fix/15162
Browse files Browse the repository at this point in the history
Fix about:blank appearing on new tab in new windows
  • Loading branch information
bsclifton committed Sep 13, 2018
1 parent babc861 commit c5dd2a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/lib/urlutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ const UrlUtil = {
*/
openableByContextMenu: function (url) {
if (!url) {
return false
return true
}
const protocol = urlParse(url).protocol
// file: is untrusted but handled in a separate check
Expand Down
6 changes: 3 additions & 3 deletions test/unit/lib/urlutilTestComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ module.exports = {
},
'is about:blank': (test) => {
test.equal(urlUtil().openableByContextMenu('about:blank'), true)
},
'is empty': (test) => {
test.equal(urlUtil().openableByContextMenu(), true)
}
},
'returns false when input:': {
Expand All @@ -349,9 +352,6 @@ module.exports = {
},
'is ssh:': (test) => {
test.equal(urlUtil().openableByContextMenu('ssh://[email protected]'), false)
},
'is null': (test) => {
test.equal(urlUtil().openableByContextMenu(null), false)
}
}
},
Expand Down

0 comments on commit c5dd2a9

Please sign in to comment.