File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -426,11 +426,15 @@ function preloadCategoryFiles() {
426426 var categoryLastUpdated = category . lastUpdated || 0 ;
427427
428428 // Find stored timestamp for this category
429- var timestampEntry = storedTimestamps . find ( function ( entry ) {
430- return entry . slug === category . slug ;
431- } ) ;
432- var storedLastUpdated = timestampEntry ? ( timestampEntry . lastUpdated || 0 ) : 0 ;
433- var timestampIndex = timestampEntry ? storedTimestamps . indexOf ( timestampEntry ) : - 1 ;
429+ var storedLastUpdated = 0 ;
430+ var timestampIndex = - 1 ;
431+ for ( var t = 0 ; t < storedTimestamps . length ; t ++ ) {
432+ if ( storedTimestamps [ t ] . slug === category . slug ) {
433+ storedLastUpdated = storedTimestamps [ t ] . lastUpdated || 0 ;
434+ timestampIndex = t ;
435+ break ;
436+ }
437+ }
434438
435439 // Check if cache file needs to be updated
436440 var needsDownload = categoryLastUpdated > storedLastUpdated ;
You can’t perform that action at this time.
0 commit comments