Skip to content

Commit

Permalink
Bugfix for URL's with no protocol
Browse files Browse the repository at this point in the history
The URL method breaks if there isn't http or https in it.
  • Loading branch information
donato authored and Rob Walch committed Nov 25, 2015
1 parent 5c4c3da commit e6d29d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/providers/flash.js
Expand Up @@ -13,7 +13,10 @@ define([
}

function flashThrottleTarget(config) {
var sameHost = ((new URL(config.flashplayer).host) === window.location.host);
var a = document.createElement('a');
a.href = config.flashplayer;

var sameHost = (a.hostname === window.location.host);

return utils.isChrome() && !sameHost;
}
Expand Down

0 comments on commit e6d29d3

Please sign in to comment.