Skip to content

Commit

Permalink
fix target value case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Oct 14, 2016
1 parent 40726a7 commit a52cef0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ require(["config", 'polyfills'], function() {
// Ensure the root is part of the anchor href, meaning it's relative.
// @NOTE: We don't need to strictly check for "_blank".
// it needs to be case insensitive.
if (href.prop.slice(0, root.length) === root && href.target != '_blank') {
var target = (href.target || '').toLowerCase();
if (href.prop.slice(0, root.length) === root && target !== '_blank') {
// Stop the default event to ensure the link will not cause a page
// refresh.
evt.preventDefault();
Expand Down

0 comments on commit a52cef0

Please sign in to comment.