Skip to content

Commit e985993

Browse files
committed
Remove redundant computation
1 parent 1df8c2d commit e985993

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

static/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ var Search = Control.extend({
523523
var $a = $(this);
524524
var isLocal = this.hostname === location.hostname;
525525
var isRelative = this.getAttribute('href').indexOf(location.hostname) === -1;
526-
if(this.hostname !== location.hostname || this.protocol !== location.protocol){
526+
if(!isLocal || this.protocol !== location.protocol){
527527
$a.attr('target', '_blank');
528528
}
529529
if(isLocal && isRelative){

0 commit comments

Comments
 (0)