Skip to content

TypeError: Cannot read property 'mac' of undefined #36

@s4uron

Description

@s4uron

If I add an Object.prototype function to my project, I get this error.

Example function to reproduce:

Object.prototype.pickProperties = function(keys) {
console.log("called!");
var clone = {};
for(var i = 0; i < keys.length; i++) {
var key = keys[i];
if(this.hasOwnProperty(key)) {
clone[key] = this[key];
}
}
return clone;
};

TypeError: Cannot read property 'mac' of undefined
at Object. (...\node_modules\uniqid\index.js:22:36)

I'm using the latest Version: uniqid@5.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions