Skip to content

Commit

Permalink
Merge pull request #10 from RiZKiT/patch-1
Browse files Browse the repository at this point in the history
Check for url before url.match
  • Loading branch information
cpojer committed Jul 31, 2013
2 parents ac653be + 7798156 commit be75822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/History.js
Expand Up @@ -21,7 +21,7 @@ provides: History
var events = Element.NativeEvents,
location = window.location,
cleanURL = function(url){
if (url.match(/^https?:\/\//)) url = '/' + url.split('/').slice(3).join('/');
if (url && url.match(/^https?:\/\//)) url = '/' + url.split('/').slice(3).join('/');
return url;
},
base = cleanURL(location.href),
Expand Down

0 comments on commit be75822

Please sign in to comment.