Skip to content

Commit

Permalink
Fix bug on sorting and deduplicating
Browse files Browse the repository at this point in the history
Before, those actions were not working when adding a folder of bookmarks.
  • Loading branch information
aledeg committed Apr 27, 2019
1 parent 3de3d38 commit 0dc328d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 = []) {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkdump",
"version": "1.13.0",
"version": "1.13.1",
"description": "Store links and dump them",
"main": "background.js",
"scripts": {
Expand Down

0 comments on commit 0dc328d

Please sign in to comment.