diff options
Diffstat (limited to 'tpl/default/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 | /** |