mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-11 08:47:27 +02:00
[#3265] silent the localStorage quota error to prevent breaking the record form panel
This commit is contained in:
1 parent
abfe18bcce
commit
ca136c5dc1
33 files changed
+52
-40
No files matched your search
@@ -141,7 +141,13 @@
|
||||
}
|
||||
|
||||
function updateDraft(newSerializedData) {
|
||||
window.localStorage.setItem(draftKey(), newSerializedData);
|
||||
try {
|
||||
window.localStorage.setItem(draftKey(), newSerializedData);
|
||||
} catch (e) {
|
||||
// ignore local storage errors in case the serialized data
|
||||
// exceed the browser localStorage single value quota
|
||||
console.warn("updateDraft failure:", e)
|
||||
}
|
||||
}
|
||||
|
||||
function restoreDraft() {
|
||||
@@ -484,6 +490,7 @@
|
||||
</svelte:fragment>
|
||||
|
||||
<div class="tabs-content">
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||
<form
|
||||
id={formId}
|
||||
class="tab-item"
|
||||
|
||||
Reference in new issue
Block a user