Closed monrax closed 3 years ago
Also replaced body.hasOwnProperty(key) with Object.prototype.hasOwnProperty.call(body, key) because Koa's objects are based on null directly (and because of this, they don't inherit from Object.protoype). Also, this way might be safer
body.hasOwnProperty(key)
Object.prototype.hasOwnProperty.call(body, key)
null
Object.protoype
Also replaced
body.hasOwnProperty(key)
withObject.prototype.hasOwnProperty.call(body, key)
because Koa's objects are based onnull
directly (and because of this, they don't inherit fromObject.protoype
). Also, this way might be safer