Update env_maker.js

This commit is contained in:
cilame 2021-11-29 14:26:39 +08:00 committed by GitHub
parent 0d7e16190d
commit 2c8c3f072b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,6 +304,7 @@ var _v = 'value'
var _g = 'get'
var _s = 'set'
var _ti = +new Date
var _objp = Object.prototype
var _isvm = typeof global == 'undefined' // 用作区别于 node 与使用 vm2 库时的标记
var _slice = Date.call.bind(Date.call, [].slice)
var _join = Date.call.bind(Date.call, [].join)
@ -412,7 +413,9 @@ function hook_obj(r,n){
a[_y] = {}
}
if (!a[_y]['fake__proto__']){
a[_y]['fake__proto__'] = hook_obj(a[b],n+'.__proto__')
if (a[b] && a[b] !== _objp){
a[_y]['fake__proto__'] = hook_obj(a[b],n+'.__proto__')
}
}
return a[_y]['fake__proto__']
}