aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-06-07 22:37:01 +0200
committerGitHub <noreply@github.com>2017-06-07 22:37:01 +0200
commit88535f20a9c1bde4d0461561a5a60be6b2bf4745 (patch)
tree57c1465f64ddc0faed3e3a8dabd7193dc0a305ee /tpl/default
parent5c6fac0bfc9583e6e372643facf6ddc50a6a1b1d (diff)
parent9bf82f4fa14a871fcda1e14e07767d788540c8e3 (diff)
downloadShaarli-88535f20a9c1bde4d0461561a5a60be6b2bf4745.tar.gz
Shaarli-88535f20a9c1bde4d0461561a5a60be6b2bf4745.tar.zst
Shaarli-88535f20a9c1bde4d0461561a5a60be6b2bf4745.zip
Merge pull request #894 from Lucas-C/bug893
Fixing "Uncaught TypeError" in shaarli.js - fix #893
Diffstat (limited to 'tpl/default')
-rw-r--r--tpl/default/js/shaarli.js5
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/**