Skip to content

Commit

Permalink
added storeId prepending
Browse files Browse the repository at this point in the history
  • Loading branch information
sghsri committed Apr 13, 2024
1 parent 50b293b commit fc6a24f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chrome-extension-toolkit",
"version": "0.0.63",
"version": "0.0.64",
"description": "A template for creating npm packages using TypeScript and VSCode",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/storage/createStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ function createStore<T>(
const defaultsToSet = {};

for (const key of missingKeys) {
defaultsToSet[key] = isEncrypted ? await security.encrypt(defaults[key]) : defaults[key];
const value = defaults[key.replace(`${storeId}:`, '')];
defaultsToSet[key] = isEncrypted ? await security.encrypt(value) : value;
}

await chrome.storage[area].set(defaultsToSet);
Expand Down

1 comment on commit fc6a24f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines Statements Branches Functions
Coverage: 9%
9.09% (27/297) 15.27% (11/72) 9.72% (7/72)

Please sign in to comment.