Skip to content

Commit

Permalink
fix: 修复echart Array 判断问题
Browse files Browse the repository at this point in the history
  • Loading branch information
timhub66 committed Oct 13, 2024
1 parent ab08efe commit a73aa2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/sandbox/iframe/special_key.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

export const UN_PROXY_INSTANCEOF_KEYS = [
'Array'
]

export const escape2RawWindowKeys = [
'Array',
'getComputedStyle',
// FIX ISSUE: https://github.com/micro-zoe/micro-app/issues/1292
'DOMParser',
Expand Down
3 changes: 2 additions & 1 deletion src/sandbox/iframe/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
SCOPE_WINDOW_ON_EVENT_OF_IFRAME,
} from '../../constants'
import {
UN_PROXY_INSTANCEOF_KEYS,
escape2RawWindowKeys,
escape2RawWindowRegExpKeys,
} from './special_key'
Expand Down Expand Up @@ -92,7 +93,7 @@ function patchWindowProperty (
* 4. native url instanceof iframe window.URL
* ...
*/
if (isConstructor(microAppWindow[key]) && key in rawWindow) {
if (isConstructor(microAppWindow[key]) && key in rawWindow && !UN_PROXY_INSTANCEOF_KEYS.includes(key)) {
rawDefineProperty(microAppWindow[key], Symbol.hasInstance, {
configurable: true,
enumerable: false,
Expand Down

0 comments on commit a73aa2f

Please sign in to comment.