Skip to content

Commit c4111ae

Browse files
committed
fix: store first 50 images in cache instead of last 50 to always show most predictable results
1 parent c146078 commit c4111ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ function RemoteFunctions(config = {}) {
27862786
const newImages = currentImages.concat(data.results);
27872787

27882788
if (newImages.length > CACHE_MAX_IMAGES) {
2789-
_imageGalleryCache.allImages = newImages.slice(-CACHE_MAX_IMAGES);
2789+
_imageGalleryCache.allImages = newImages.slice(0, CACHE_MAX_IMAGES);
27902790
} else {
27912791
_imageGalleryCache.allImages = newImages;
27922792
}

0 commit comments

Comments
 (0)