Skip to content

Commit

Permalink
feat(compiler): Allow BigInt usage in templates (issue #11126)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowings-zy committed Feb 27, 2020
1 parent 7b626a8 commit fdfb563
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/instance/proxy.js
Expand Up @@ -6,16 +6,12 @@ import { warn, makeMap, isNative } from '../util/index'
let initProxy

if (process.env.NODE_ENV !== 'production') {
const supportBigInt =
(typeof window !== 'undefined' && typeof window.BigInt === 'function') ||
(typeof global !== 'undefined' && typeof global.BigInt === 'function')

const allowedGlobals = makeMap(
'Infinity,undefined,NaN,isFinite,isNaN,' +
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
'require,' + // for Webpack/Browserify
(supportBigInt ? 'BigInt' : '') // for BigInt support issue #11126
'BigInt' // for BigInt support issue #11126
)

const warnNonPresent = (target, key) => {
Expand Down

0 comments on commit fdfb563

Please sign in to comment.