fix mutatormap property bug
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user