fix: 从原型链添加toJson方法

This commit is contained in:
coding 2018-01-05 11:28:06 +00:00
parent d41e2fa62a
commit 74946d23fd

View File

@ -31,7 +31,7 @@
// // JSON快捷方法
if(!Object.toJson){
Object.defineProperty(Object, "toJson", {
Object.defineProperty(Object.prototype, "toJson", {
enumerable: false,
value: function() {
return JSON.stringify(this);