aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-05-12 07:49:37 +0100
committerStephen Blott2016-05-12 07:49:43 +0100
commita1c00c38abee530f84572c36c7422e4ee793316b (patch)
tree93eb789b8a4d1e30b7d1f67526fe739cca7eac8d
parent22f0ed9c3c63ecbc4fc2413dc5235a9489d9cf25 (diff)
downloadvimium-a1c00c38abee530f84572c36c7422e4ee793316b.tar.bz2
Guard against non-string values.
If the link's value is not a string, then the previous version of this fails. The new test will be false for such links.
-rw-r--r--content_scripts/vimium_frontend.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 59403344..2141d40f 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -564,7 +564,7 @@ findAndFollowLink = (linkStrings) ->
linkMatches = false
for linkString in linkStrings
if link.innerText.toLowerCase().indexOf(linkString) != -1 ||
- link.value?.indexOf(linkString) != -1
+ 0 <= link.value?.indexOf? linkString
linkMatches = true
break
continue unless linkMatches