Skip to content

Commit bd100bf

Browse files
committed
🐛 #1714 修复小程序初始化时报错的问题
1 parent c1c66e9 commit bd100bf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,12 @@ protected String extractAccessToken(String resultContent) throws WxErrorExceptio
298298

299299
@Override
300300
public WxMaConfig getWxMaConfig() {
301-
return this.wxMaConfig;
301+
if (this.configMap.size() == 1) {
302+
// 只有一个小程序,直接返回其配置即可
303+
return this.configMap.values().iterator().next();
304+
}
305+
306+
return this.configMap.get(WxMaConfigHolder.get());
302307
}
303308

304309
@Override

0 commit comments

Comments
 (0)