From bf40849e35558fe565c098b4293bec82ad97c757 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 14 Dec 2014 12:18:03 +1100 Subject: [PATCH] make ensureProto methods non-enumerable --- lib/6to5/polyfill.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/6to5/polyfill.js b/lib/6to5/polyfill.js index 5d945d16e8..9c2cf47317 100644 --- a/lib/6to5/polyfill.js +++ b/lib/6to5/polyfill.js @@ -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 + }); + } }; //