File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 204204 recentTimeRanges = JSON .parse (stored);
205205 }
206206 } catch (e) {
207+ console .warn (` [TimeRangePicker] Failed to load recent time ranges from localStorage (key: ${ storageKey} ):` , e);
207208 recentTimeRanges = [];
208209 }
209210 }
251252 recentTimeRanges = [newRange, ... recentTimeRanges].slice (0 , MAX_RECENT_ITEMS );
252253
253254 localStorage .setItem (storageKey, JSON .stringify (recentTimeRanges));
254- } catch (e) {}
255+ } catch (e) {
256+ console .warn (` [TimeRangePicker] Failed to save recent time range to localStorage (key: ${ storageKey} ):` , e);
257+ }
255258 }
256259
257260 /** @param {number} index */
258261 function removeRecentTimeRange (index ) {
259262 recentTimeRanges = recentTimeRanges .filter ((_ , idx ) => idx !== index);
260263 try {
261264 localStorage .setItem (storageKey, JSON .stringify (recentTimeRanges));
262- } catch (e) {}
265+ } catch (e) {
266+ console .warn (` [TimeRangePicker] Failed to remove recent time range from localStorage (key: ${ storageKey} ):` , e);
267+ }
263268 }
264269
265270 /** @param {string} optionValue */
You can’t perform that action at this time.
0 commit comments