Skip to content

Commit

Permalink
Merge pull request #8 from darx/fix/in-line-keys-issue
Browse files Browse the repository at this point in the history
fix/in line keys issue
  • Loading branch information
darx authored Jul 30, 2022
2 parents e7fc8e9 + 2c0ccb9 commit eec9773
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indexeddb-edit",
"version": "0.0.5",
"version": "0.0.6",
"private": true,
"scripts": {
"build": "rollup -c",
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "IndexedDBEdit",
"version": "0.0.5",
"version": "0.0.6",
"manifest_version": 3,
"description": "Devtools panel for changing IndexedDB key values",
"devtools_page": "devtools.html",
Expand Down
8 changes: 7 additions & 1 deletion src/utils/storage/fixtures/updateRecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
request = objectStore.get(${storeNameKey});

request.onsuccess = () => {
objectStore.put(${storeNameKeyValue}, ${storeNameKey})
try {
objectStore.put(${storeNameKeyValue}, ${storeNameKey});
} catch (e) {
if (e && e.message.indexOf("in-line keys") !== -1) {
objectStore.put(${storeNameKeyValue});
}
}
};
};
})();

0 comments on commit eec9773

Please sign in to comment.