Skip to content

Nested properties overwrite non-nested properties #10

Open
@c-a-m

Description

@c-a-m

We have one shield settings that is both part of the hierarchy of setting names, and also a leaf-node setting:
shield.transport.ssl is a boolean that turns ssl on and off
shield.transport.ssl.client.auth is a boolean that turns on/off client-certificate authentication

if shield.transport.ssl is set before shield.transport.ssl.client.auth it gives this error:

esvm (1.0) $ esvm

/usr/local/lib/node_modules/esvm/lib/explodeBy.js:9
        memo[_key] = value;
                   ^
TypeError: Cannot set property 'auth' of undefined
    at walk (/usr/local/lib/node_modules/esvm/lib/explodeBy.js:9:20)
    at walk (/usr/local/lib/node_modules/esvm/lib/explodeBy.js:12:9)
    at walk (/usr/local/lib/node_modules/esvm/lib/explodeBy.js:12:9)
    at walk (/usr/local/lib/node_modules/esvm/lib/explodeBy.js:12:9)
    at walk (/usr/local/lib/node_modules/esvm/lib/explodeBy.js:12:9)
    at walk (/usr/local/lib/node_modules/esvm/lib/explodeBy.js:12:9)
    at /usr/local/lib/node_modules/esvm/lib/explodeBy.js:14:7
    at forOwn (/usr/local/lib/node_modules/esvm/node_modules/lodash/dist/lodash.js:2105:15)
    at Function.forEach (/usr/local/lib/node_modules/esvm/node_modules/lodash/dist/lodash.js:3302:9)
    at module.exports (/usr/local/lib/node_modules/esvm/lib/explodeBy.js:4:5)

If shield.transport.ssl.client.auth comes first, it gets overridden by shield.transport.ssl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions