Skip to content

Commit

Permalink
fix slice to properly check for protocol, closes GH-35
Browse files Browse the repository at this point in the history
  • Loading branch information
tbranyen committed Jan 14, 2012
1 parent c863c0f commit 7213167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/index.js
Expand Up @@ -98,7 +98,7 @@ jQuery(function($) {
var protocol = this.protocol + "//";

// Ensure the protocol is not part of URL, meaning its relative.
if (href.slice(protocol.length) !== protocol) {
if (href.slice(0, protocol.length) !== protocol) {
// Stop the default event to ensure the link will not cause a page
// refresh.
evt.preventDefault();
Expand Down

0 comments on commit 7213167

Please sign in to comment.