@@ -1,7 +1,7 @@
/* not type checking this file because flow doesn't play well with Proxy */
import config from 'core/config'
-import { warn, makeMap } from '../util/index'
+import { warn, makeMap, isNative } from '../util/index'
let initProxy
@@ -25,8 +25,7 @@ if (process.env.NODE_ENV !== 'production') {
}
const hasProxy =
- typeof Proxy !== 'undefined' &&
- Proxy.toString().match(/native code/)
+ typeof Proxy !== 'undefined' && isNative(Proxy)
if (hasProxy) {
const isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact')