(value)
| 9 | } |
| 10 | |
| 11 | function isPlainObject (value) { |
| 12 | if (value === null || typeof value !== 'object' || type(value) !== 'Object') return false |
| 13 | const proto = Object.getPrototypeOf(value) |
| 14 | if (proto === null) return true |
| 15 | // 处理支付宝接口返回数据对象的__proto__与js中创建对象的__proto__不一致的问题,判断value.__proto__.__proto__ === null时也认为是plainObject |
| 16 | const innerProto = Object.getPrototypeOf(proto) |
| 17 | if (proto === Object.prototype || innerProto === null) return true |
| 18 | // issue #644 |
| 19 | const observeClassInstance = mpxGlobal.__mpx?.config.observeClassInstance |
| 20 | if (observeClassInstance) { |
| 21 | if (Array.isArray(observeClassInstance)) { |
| 22 | for (let i = 0; i < observeClassInstance.length; i++) { |
| 23 | if (proto === observeClassInstance[i].prototype) return true |
| 24 | } |
| 25 | } else { |
| 26 | return true |
| 27 | } |
| 28 | } |
| 29 | return false |
| 30 | } |
| 31 | |
| 32 | function diffAndCloneA (a, b) { |
| 33 | let diffData = null |
no test coverage detected