make ensureProto methods non-enumerable

This commit is contained in:
Sebastian McKenzie
2014-12-14 12:18:03 +11:00
parent 194fb77b9c
commit bf40849e35

View File

@@ -6,7 +6,11 @@ var ensureSymbol = function (key) {
var ensureProto = function (Constructor, key, val) {
var proto = Constructor.prototype;
proto[key] = proto[key] || val;
if (!proto[key]) {
Object.defineProperty(proto, key, {
value: val
});
}
};
//