diff options
author | Lucas Cimon <lucas.cimon@gmail.com> | 2017-06-07 16:08:35 +0200 |
---|---|---|
committer | Lucas Cimon <lucas.cimon@gmail.com> | 2017-06-07 16:10:24 +0200 |
commit | 9bf82f4fa14a871fcda1e14e07767d788540c8e3 (patch) | |
tree | 57c1465f64ddc0faed3e3a8dabd7193dc0a305ee /tpl/default/js/shaarli.js | |
parent | 5c6fac0bfc9583e6e372643facf6ddc50a6a1b1d (diff) | |
download | Shaarli-9bf82f4fa14a871fcda1e14e07767d788540c8e3.tar.gz Shaarli-9bf82f4fa14a871fcda1e14e07767d788540c8e3.tar.zst Shaarli-9bf82f4fa14a871fcda1e14e07767d788540c8e3.zip |
Fixing "Uncaught TypeError" in shaarli.js - fix #893
Diffstat (limited to 'tpl/default/js/shaarli.js')
-rw-r--r-- | tpl/default/js/shaarli.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 4ebb7815..b120c91e 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js | |||
@@ -418,7 +418,8 @@ window.onload = function () { | |||
418 | * | 418 | * |
419 | * TODO: support error code in the backend for AJAX requests | 419 | * TODO: support error code in the backend for AJAX requests |
420 | */ | 420 | */ |
421 | var existingTags = document.querySelector('input[name="taglist"]').value.split(' '); | 421 | var tagList = document.querySelector('input[name="taglist"]'); |
422 | var existingTags = tagList ? tagList.value.split(' ') : []; | ||
422 | var awesomepletes = []; | 423 | var awesomepletes = []; |
423 | 424 | ||
424 | // Display/Hide rename form | 425 | // Display/Hide rename form |
@@ -515,7 +516,7 @@ window.onload = function () { | |||
515 | }); | 516 | }); |
516 | }); | 517 | }); |
517 | 518 | ||
518 | updateAwesompleteList('.rename-tag-input', document.querySelector('input[name="taglist"]').value.split(' '), awesomepletes); | 519 | updateAwesompleteList('.rename-tag-input', existingTags, awesomepletes); |
519 | }; | 520 | }; |
520 | 521 | ||
521 | /** | 522 | /** |