diff --git a/packages/convict/src/main.js b/packages/convict/src/main.js index 5aad9325..9ee31fe9 100644 --- a/packages/convict/src/main.js +++ b/packages/convict/src/main.js @@ -561,8 +561,10 @@ const convict = function convict(def, opts) { const path = k.split('.') const childKey = path.pop() const parentKey = path.join('.') - const parent = walk(this._instance, parentKey, true) - parent[childKey] = v + if (!(parentKey == '__proto__' || parentKey == 'constructor' || parentKey == 'prototype')) { + const parent = walk(this._instance, parentKey, true) + parent[childKey] = v + } return this },