diff options
| author | Stephen Blott | 2016-05-12 07:49:37 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2016-05-12 07:49:43 +0100 | 
| commit | a1c00c38abee530f84572c36c7422e4ee793316b (patch) | |
| tree | 93eb789b8a4d1e30b7d1f67526fe739cca7eac8d /content_scripts/vimium_frontend.coffee | |
| parent | 22f0ed9c3c63ecbc4fc2413dc5235a9489d9cf25 (diff) | |
| download | vimium-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.
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 2 | 
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 | 
