`.text' is not available for all links, avoid undefined one - dotfiles - leot's dotfiles
 (HTM) hg clone https://bitbucket.org/iamleot/dotfiles
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) changeset f56e96d6e47eff264ab8ba25227ee9ef0ba53f0a
 (DIR) parent 669dd387a0656b759900488ea013997acbd95bce
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Sun,  9 Jun 2019 14:56:57 
       
       `.text' is not available for all links, avoid undefined one
       
       Diffstat:
        surf/script/default.js |  6 ++++--
        1 files changed, 4 insertions(+), 2 deletions(-)
       ---
       diff -r 669dd387a065 -r f56e96d6e47e surf/script/default.js
       --- a/surf/script/default.js    Sun Jun 09 14:55:39 2019 +0200
       +++ b/surf/script/default.js    Sun Jun 09 14:56:57 2019 +0200
       @@ -77,7 +77,8 @@
        
               for (i = document.links.length - 1; !has_prev && i >= 0; i--) {
                       for (p of previous_res) {
       -                       if (document.links[i].text.match(p)) {
       +                       if (document.links[i].text &&
       +                           document.links[i].text.match(p)) {
                                       document.links[i].accessKey = "p";
                                       has_prev = true;
                                       break;
       @@ -87,7 +88,8 @@
        
               for (i = document.links.length - 1; !has_next && i >= 0; i--) {
                       for (n of next_res) {
       -                       if (document.links[i].text.match(n)) {
       +                       if (document.links[i].text &&
       +                           document.links[i].text.match(n)) {
                                       document.links[i].accessKey = "n";
                                       has_next = true;
                                       break;