Warning of mutating the [[prototype]] of an object in d3.js?

d3.js, firefox, javascript

Solution

Does anyone have the idea why is this happening

Looks like it's d3's fault. They seem to use it to subclass arrays here:

// Until ECMAScript supports array subclassing, prototype injection works well.
var d3_subclass = function(object, prototype) {
  object.__proto__ = prototype;
};

how can I solve this?

Ignore the warning. Or file a bug against have a look at this issue of d3.js.

Problem

I am working with d3.js for Data visualization. I am getting the warning shown in the following image. Does anyone have the idea why is this happening and how can I solve this? The message shown in the error is following ``` mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create ```

Original source

Related problems