Skip to content

Commit

Permalink
fix(mp-toutiao): 使用国际化报错的bug (question/161008)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurj26 committed Feb 2, 2024
1 parent 01fe304 commit 4428960
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ export default function parseBaseApp (vm, {

delete this.$options.mpType
delete this.$options.mpInstance
if (this.mpType === 'page' && typeof getApp === 'function') { // hack vue-i18n
if (
(__PLATFORM__ === 'mp-toutiao' || __PLATFORM__ === 'mp-lark'
? this.mpType !== 'app'
: this.mpType === 'page') &&
typeof getApp === 'function'
) { // hack vue-i18n
const app = getApp()
if (app.$vm && app.$vm.$i18n) {
this._i18n = app.$vm.$i18n
Expand Down

0 comments on commit 4428960

Please sign in to comment.