Skip to content

Commit

Permalink
Fix local demo.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
daspecster committed Jun 18, 2016
1 parent f0d3532 commit 8a40131
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jquery.ziptastic.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
requests[country] = {};
}
if(!requests[country][zip]) {
requests[country][zip] = $.getJSON(location.protocol + '//zip.getziptastic.com/v2/' + country + '/' + zip);
var protocol = '';
if (location.protocol == 'file:') {
protocol = 'https://';
} else {
protocol = location.protocol;
}
requests[country][zip] = $.getJSON(protocol + '//zip.getziptastic.com/v2/' + country + '/' + zip);
}

// Bind to the finished request
Expand Down

0 comments on commit 8a40131

Please sign in to comment.