Skip to content

Commit

Permalink
fix: 修复 taroGlobalData 不生效的问题 (#15818)
Browse files Browse the repository at this point in the history
Co-authored-by: xuanzebin <[email protected]>
  • Loading branch information
xuanzebin and xuanzebin authored May 29, 2024
1 parent f34cf39 commit 1c613d6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export function createReactApp (
const keys = Object.keys(globalData)
const descriptors = Object.getOwnPropertyDescriptors(globalData)
keys.forEach(key => {
Object.defineProperty(this, key, {
Object.defineProperty(Current?.app || this, key, {
configurable: true,
enumerable: true,
get () {
Expand All @@ -207,7 +207,7 @@ export function createReactApp (
}
})
})
Object.defineProperties(this, descriptors)
Object.defineProperties(Current?.app || this, descriptors)
}

app.onCreate?.()
Expand Down

0 comments on commit 1c613d6

Please sign in to comment.