fix: || -> ??
This commit is contained in:
1 parent
f66d7b11a8
commit
abfda0dd58
5 files changed
+32
-34
No files matched your search
@@ -19,10 +19,10 @@ export default class SendLike extends BaseAction<Payload, null> {
|
||||
|
||||
async _handle(payload: Payload): Promise<null> {
|
||||
const qq = payload.user_id.toString();
|
||||
const uid: string = await this.core.apis.UserApi.getUidByUinV2(qq) || '';
|
||||
const uid: string = await this.core.apis.UserApi.getUidByUinV2(qq) ?? '';
|
||||
const result = await this.core.apis.UserApi.like(uid, parseInt(payload.times?.toString()) || 1);
|
||||
if (result.result !== 0) {
|
||||
throw new Error( `点赞失败 ${result.errMsg}`);
|
||||
throw new Error(`点赞失败 ${result.errMsg}`);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user