mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Change indexOf string matching calls to use regex
This commit is contained in:
@@ -35,7 +35,7 @@ class WindowEventHandler
|
||||
return unless location
|
||||
return if location[0] is '#'
|
||||
|
||||
if location.indexOf('https://') is 0 or location.indexOf('http://') is 0
|
||||
if /^https?:\/\//.test(location)
|
||||
require('shell').openExternal location
|
||||
false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user