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 {
6161 #countEntriesQuery
6262
6363 /**
64- * @type {import('node:sqlite').StatementSync }
64+ * @type {import('node:sqlite').StatementSync | null }
6565 */
6666 #deleteOldValuesQuery
6767
@@ -344,14 +344,14 @@ module.exports = class SqliteCacheStore {
344344
345345 {
346346 const removed = this . #deleteExpiredValuesQuery. run ( Date . now ( ) ) . changes
347- if ( removed > 0 ) {
347+ if ( removed ) {
348348 return removed
349349 }
350350 }
351351
352352 {
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 ) {
355355 return removed
356356 }
357357 }
You can’t perform that action at this time.
0 commit comments