Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selectiveNotDeepExtend throws if property is null in extended object #845

Open
yehiyam opened this issue Mar 21, 2021 · 0 comments
Open

Comments

@yehiyam
Copy link

yehiyam commented Mar 21, 2021

When a source property is null and the target property is an object selectiveNotDeepExtend throws an exception:

Cannot read property 'constructor' of null at

node_modules/vis-util/peer/umd/vis-util.js:7108
        if (a[prop].constructor === Object) 

short reproduction:

const visutil = require('vis-util')
const a = {
    color: 'red',
    nullProp: null
}

const b = {
    color: 'blue',
    nullProp: {
        type: 'foo'
    }
}

visutil.selectiveNotDeepExtend([],a,b)

fixed by #844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant