Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fixing issues with first run

uggrock07e227ff3795
diff --git a/data/chromelight/popup.js b/data/chromelight/popup.js
index ea018af0c..703e2ffc1 100644
--- a/data/chromelight/popup.js
+++ b/data/chromelight/popup.js
@@ -12,21 +12,26 @@
var tagLibrary;
function init() {
+ $("#startTagSpaces").on("click", function (e) {
+ chrome.tabs.create({url: '../index.html'});
+ });
+
+ var tagList = extractAllTags(tagLibrary);
+ if(tagList == undefined) {
+ tagList = [];
+ }
+
loadSettingsLocalStorage();
$('#tags').select2('data', null);
$("#tags").select2({
multiple: true,
- tags: extractAllTags(tagLibrary),
+ tags: tagList,
tokenSeparators: [","," "],
minimumInputLength: 2,
selectOnBlur: true
});
- $("#startTagSpaces").on("click", function (e) {
- chrome.tabs.create({url: '../index.html'});
- });
-
$("#saveAsMhtml").on('click', saveAsMHTML);
$("#saveSelectionAsHtml").on("click", function () {