fix ci warnings

This commit is contained in:
undefined committed 2025-07-24 14:00:13 +08:00
1 parent 98d9ddf97a
commit 4b2d4c74cd
13 files changed
+30 -22

No files matched your search

+1 -1
View File
@@ -195,7 +195,7 @@ export async function apply(ctx: Context) {
if (overrideLimit) maxOperations = overrideLimit;
// deprecated: remove boolean support in future
if (typeof defaultKey === 'boolean') defaultKey = defaultKey ? '{{user}}' : '{{ip}}';
const id = defaultKey.replace('{{ip}}', this.request.ip).replace('{{user}}', this.user._id);
const id = defaultKey.replace('{{ip}}', this.request.ip).replace('{{user}}', this.user?._id?.toString() || '0');
await opcount.inc(op, id, periodSecs, maxOperations);
},
renderTitle(str: string) {