File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -854,7 +854,7 @@ Tell me: what is stirring in you today?`,
854854 timestamp = rawMessage . timestamp ;
855855 } else if ( typeof rawMessage . timestamp === 'string' ) {
856856 const parsed = Date . parse ( rawMessage . timestamp ) ;
857- if ( ! isNaN ( parsed ) ) {
857+ if ( ! Number . isNaN ( parsed ) ) {
858858 timestamp = parsed ;
859859 }
860860 }
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ document.addEventListener('DOMContentLoaded', () => {
4949 }
5050 ] ;
5151
52- let stories = JSON . parse ( localStorage . getItem ( 'bibliodrift_community_stories' ) ) || defaultStories ;
52+ let stories = ( ( ) => { try { return JSON . parse ( localStorage . getItem ( 'bibliodrift_community_stories' ) ) } catch { return null } } ) ( ) || defaultStories ;
5353
5454 // Save to local storage
5555 const saveStories = ( ) => {
Original file line number Diff line number Diff line change @@ -15,25 +15,4 @@ const ASSETS_TO_CACHE = [
1515self . addEventListener ( 'install' , ( event ) => {
1616 event . waitUntil (
1717 caches . open ( CACHE_NAME ) . then ( ( cache ) => {
18- console . log ( 'Caching essential UI sanctuary assets...' ) ;
19- return cache . addAll ( ASSETS_TO_CACHE ) ;
20- } )
21- ) ;
22- } ) ;
23-
24- // Fetch Event: Cache-First strategy for core layout files
25- self . addEventListener ( 'fetch' , ( event ) => {
26- // Only intercept local GET requests
27- if ( event . request . method !== 'GET' || ! event . request . url . startsWith ( self . location . origin ) ) {
28- return ;
29- }
30-
31- event . respondWith (
32- caches . match ( event . request ) . then ( ( cachedResponse ) => {
33- if ( cachedResponse ) {
34- return cachedResponse ; // Return local cache copy
35- }
36- return fetch ( event . request ) ; // Fallback to network
37- } )
38- ) ;
39- } ) ;
18+ . catch ( err => console . error ( err ) )
You can’t perform that action at this time.
0 commit comments