Meteor-Community-Packages / meteor-collection-extensions

Safely and easily extend the (Meteor/Mongo).Collection constructor with custom functionality.
https://packosphere.com/lai/collection-extensions
MIT License
31 stars 14 forks source link

[warning] mutating the [[Prototype]] of an object will cause your code to run very slowly #10

Closed escaroda closed 9 years ago

escaroda commented 9 years ago

I don't use this package directly (and can't find where it comes from in my system) but I'm always getting this annoying warning in firefox console

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

and peace of code:

capture11

escaroda commented 9 years ago

I've found out that it's from mongol package (and I don't need it in production) but anyway. Is this warning ok?

rclai commented 9 years ago

This is a common warning that is raised only by Firefox, when replacing the prototype of an object, there's nothing that can be done about it, except not do that, but then the Meteor.users collection will not work properly.