File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ module.exports = class SqliteCacheStore {
61
61
#countEntriesQuery
62
62
63
63
/**
64
- * @type {import('node:sqlite').StatementSync }
64
+ * @type {import('node:sqlite').StatementSync | null }
65
65
*/
66
66
#deleteOldValuesQuery
67
67
@@ -344,14 +344,14 @@ module.exports = class SqliteCacheStore {
344
344
345
345
{
346
346
const removed = this . #deleteExpiredValuesQuery. run ( Date . now ( ) ) . changes
347
- if ( removed > 0 ) {
347
+ if ( removed ) {
348
348
return removed
349
349
}
350
350
}
351
351
352
352
{
353
- const removed = this . #deleteOldValuesQuery. run ( Math . max ( Math . floor ( this . #maxCount * 0.1 ) , 1 ) ) . changes
354
- if ( removed > 0 ) {
353
+ const removed = this . #deleteOldValuesQuery? .run ( Math . max ( Math . floor ( this . #maxCount * 0.1 ) , 1 ) ) . changes
354
+ if ( removed ) {
355
355
return removed
356
356
}
357
357
}
You can’t perform that action at this time.
0 commit comments