refactor: use global whitelist for render proxy has check
This commit is contained in:
7
packages/shared/src/globalsWhitelist.ts
Normal file
7
packages/shared/src/globalsWhitelist.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const globalsWhitelist = new Set(
|
||||
(
|
||||
'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
|
||||
'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
|
||||
'Object,Boolean,String,RegExp,Map,Set,JSON,Intl'
|
||||
).split(',')
|
||||
)
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from './patchFlags'
|
||||
export { globalsWhitelist } from './globalsWhitelist'
|
||||
|
||||
export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__
|
||||
? Object.freeze({})
|
||||
|
||||
Reference in New Issue
Block a user