Skip to content

Commit 0b0ccc4

Browse files
conico974vicb
andauthored
Apply suggestions from code review
Co-authored-by: Victor Berchet <[email protected]>
1 parent 6695a2b commit 0b0ccc4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/open-next/src/overrides/incrementalCache/multi-tier-ddb-s3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const multiTierCache: IncrementalCache = {
8080
// If the metadata is older than the local cache, we can use the local cache
8181
// If it's not found we assume that no write has been done yet and we can use the local cache
8282
const lastModified = data.Item?.revalidatedAt?.N
83-
? Number.parseInt(data.Item.revalidatedAt.N)
83+
? Number.parseInt(data.Item.revalidatedAt.N, 10)
8484
: 0;
8585
if (lastModified <= localCacheEntry.lastModified) {
8686
debug("Using local cache after checking ddb");

packages/open-next/src/utils/lru.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class LRUCache<T> {
1515
set(key: string, value: any) {
1616
if (this.cache.size >= this.maxSize) {
1717
const firstKey = this.cache.keys().next().value;
18-
if (firstKey) {
18+
if (firstKey !== undefined) {
1919
this.cache.delete(firstKey);
2020
}
2121
}

0 commit comments

Comments
 (0)