File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
packages/sds/src/message_channel Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,11 @@ export class PersistentHistory implements ILocalHistory {
101101 if ( ! this . storage ) {
102102 return ;
103103 }
104- try {
105- const payload = JSON . stringify (
106- this . memory . slice ( 0 ) . map ( serializeContentMessage )
107- ) ;
108- this . storage . setItem ( this . storageKey , payload ) ;
109- } catch {
110- // Ignore persistence errors (e.g. quota exceeded).
111- }
104+
105+ const payload = JSON . stringify (
106+ this . memory . slice ( 0 ) . map ( serializeContentMessage )
107+ ) ;
108+ this . storage . setItem ( this . storageKey , payload ) ;
112109 }
113110
114111 private load ( ) : void {
@@ -130,11 +127,7 @@ export class PersistentHistory implements ILocalHistory {
130127 this . memory . push ( ...messages ) ;
131128 }
132129 } catch {
133- try {
134- this . storage . removeItem ( this . storageKey ) ;
135- } catch {
136- // Ignore cleanup errors.
137- }
130+ this . storage . removeItem ( this . storageKey ) ;
138131 }
139132 }
140133}
You can’t perform that action at this time.
0 commit comments