提交 51ceb377 编写于 作者: D DCloud_LXH

fix(mp): 修复language属性为undefined时接口报错的Bug

上级 992d402a
......@@ -79,7 +79,7 @@ export function populateParameters (result) {
if (__PLATFORM__ === 'mp-alipay') { _SDKVersion = my.SDKVersion }
// hostLanguage
const hostLanguage = language.replace(/_/g, '-')
const hostLanguage = (language || '').replace(/_/g, '-')
// wx.getAccountInfoSync
......
......@@ -7,7 +7,7 @@ export default {
const _hostName = getHostName(result)
const hostLanguage = language.replace('_', '-')
const hostLanguage = (language || '').replace('_', '-')
result = sortObject(Object.assign(result, {
appId: process.env.UNI_APP_ID,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册