Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ailtonloures committed Oct 29, 2024
2 parents 3d23b1e + 45d9fb6 commit 9e613de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-bookmark",
"productName": "VSCode Bookmark",
"description": "A utility to save your favorite projects and open them easily in vscode.",
"version": "1.2.0",
"version": "1.2.1",
"author": "Ailton Loures",
"homepage": "https://github.com/ailtonloures/vscode-bookmark#readme",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/data/store/bookmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ function createBookmark(filePath) {
]);
}

function getBookmarks() {
return store.get(storeName).slice(0, 10);
function getBookmarks(limit = 10) {
return store.get(storeName).slice(0, limit);
}

function deleteBookmark(id) {
Expand Down
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ function renderApp(context) {
label,
type: 'normal',
click: async () => {
const filePath = await openDialog(dialogProperties);
const filePaths = await openDialog(dialogProperties);

if (!filePath) return;
if (!filePaths) return;

createBookmark(filePath);
createBookmark(filePaths.at(0));
renderApp(context);
},
});
Expand Down

0 comments on commit 9e613de

Please sign in to comment.