diff --git a/lib/6to5/util.js b/lib/6to5/util.js index 9a1f25ba2e..3ab08d6900 100644 --- a/lib/6to5/util.js +++ b/lib/6to5/util.js @@ -91,7 +91,14 @@ exports.sourceMapToComment = function (map) { }; exports.pushMutatorMap = function (mutatorMap, key, kind, method) { - var map = mutatorMap[key] = mutatorMap[key] || {}; + var map; + if (_.has(mutatorMap, key)) { + map = mutatorMap[key]; + } else { + map = {}; + } + mutatorMap[key] = map; + if (map[kind]) { throw new Error("a " + kind + " already exists for this property"); } else {