]> khamidou — GitHub mirrors - electron.git/commitdiff
Don't use pure number as host name.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 27 Aug 2014 12:49:57 +0000 (20:49 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 27 Aug 2014 12:49:57 +0000 (20:49 +0800)
Numbers would be treated as IP addresses.

atom/browser/lib/chrome-extension.coffee

index 736bbdd008972f5c18a7db51bcf67d88ab4cdc22..3a62da57b43b3cf419d4f17790ee48f8322be727 100644 (file)
@@ -8,7 +8,7 @@ hostPathMap = {}
 hostPathMapNextKey = 0
 
 getHostForPath = (path) ->
-  key = "#{++hostPathMapNextKey}"
+  key = "extension-#{hostPathMapNextKey}"
   hostPathMap[key] = path
   key