From 0dc328d9ce7fceb438b9820786df72c22e94ad71 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 27 Apr 2019 10:36:47 +0200 Subject: [PATCH] Fix bug on sorting and deduplicating Before, those actions were not working when adding a folder of bookmarks. --- background.js | 4 +++- manifest.json | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/background.js b/background.js index aca3aad..c10406f 100644 --- a/background.js +++ b/background.js @@ -22,6 +22,8 @@ async function addLink(link) { let urls = storage.urls || []; urls.push(link); + urls = urls.flat(); + await browser.storage.local.get('options').then(obj => { if (obj.options === undefined || obj.options.other === undefined) { return; @@ -34,7 +36,7 @@ async function addLink(link) { } }) - await browser.storage.local.set({ "urls": urls.flat() }); + await browser.storage.local.set({ "urls": urls}); } function getLinks(bookmark, initialLinks = []) { diff --git a/manifest.json b/manifest.json index 921a180..833fd35 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "manifest_version": 2, "name": "LinkDump", - "version": "1.13", + "version": "1.13.1", "description": "__MSG_extensionDescription__", "icons": { "48": "icons/linkdump-48.png" diff --git a/package-lock.json b/package-lock.json index c2956f7..50a4975 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "linkdump", - "version": "1.13.0", + "version": "1.13.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c770334..7d0bb73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkdump", - "version": "1.13.0", + "version": "1.13.1", "description": "Store links and dump them", "main": "background.js", "scripts": {