Skip to content

Commit 6d26ef9

Browse files
committed
fix: update required check
1 parent f4f0b14 commit 6d26ef9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default class AutoRemovePlugin extends AdminForthPlugin {
5757
if (this.options.mode !== 'time-based' && this.options.mode !== 'count-based'){
5858
throw new Error(`wrong delete mode "${this.options.mode}", please set "time-based" or "count-based"`);
5959
}
60-
if (!this.options.minItemsKeep){
60+
if (this.options.mode === 'count-based' && !this.options.minItemsKeep){
6161
throw new Error('minItemsKeep is required');
6262
}
6363
}

0 commit comments

Comments
 (0)