一个错误的assert

This commit is contained in:
Xu Chang 2023-02-08 22:38:19 +08:00
parent abc1fa89a0
commit 67ab3b4f4c
2 changed files with 2 additions and 2 deletions

View File

@ -596,7 +596,7 @@ function tryRefreshWechatPublicUserInfo(wechatUserId, context) {
_a = tslib_1.__read.apply(void 0, [_j.sent(), 1]), wechatUser = _a[0]; _a = tslib_1.__read.apply(void 0, [_j.sent(), 1]), wechatUser = _a[0];
application = context.getApplication(); application = context.getApplication();
_b = application, type = _b.type, config = _b.config; _b = application, type = _b.type, config = _b.config;
(0, assert_1.assert)(type === 'wechatPublic' && config.type === 'wechatPublic'); (0, assert_1.assert)(type !== 'wechatMp' && config.type !== 'wechatMp');
config2 = config; config2 = config;
appId = config2.appId; appId = config2.appId;
appSecret = config2.appSecret; appSecret = config2.appSecret;

View File

@ -474,7 +474,7 @@ async function tryRefreshWechatPublicUserInfo<ED extends EntityDict, Cxt extends
const application = context.getApplication(); const application = context.getApplication();
const { type, config } = application!; const { type, config } = application!;
assert(type === 'wechatPublic' && config!.type === 'wechatPublic'); assert(type !== 'wechatMp' && config!.type !== 'wechatMp');
let appId: string, appSecret: string; let appId: string, appSecret: string;
const config2 = config as WechatPublicConfig; const config2 = config as WechatPublicConfig;
appId = config2.appId; appId = config2.appId;