aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee8
1 files changed, 4 insertions, 4 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 6de17ec5..9dd68278 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -563,8 +563,8 @@ findAndFollowLink = (linkStrings) ->
linkMatches = false
for linkString in linkStrings
- if (link.innerText.toLowerCase().indexOf(linkString) != -1 || link.value &&
- link.value.indexOf(linkString) != -1)
+ if link.innerText.toLowerCase().indexOf(linkString) != -1 ||
+ link.value?.indexOf(linkString) != -1
linkMatches = true
break
continue unless linkMatches
@@ -596,8 +596,8 @@ findAndFollowLink = (linkStrings) ->
else
new RegExp linkString, "i"
for candidateLink in candidateLinks
- if (exactWordRegex.test(candidateLink.innerText) ||
- candidateLink.value && exactWordRegex.test(candidateLink.value))
+ if exactWordRegex.test(candidateLink.innerText) ||
+ (candidateLink.value && exactWordRegex.test(candidateLink.value))
followLink(candidateLink)
return true
false