Remove duplication in error of unknown key.

"Unknown key in field Y" instead of "Unknown key Y in field Y"
This commit is contained in:
Slava Kim
2013-08-02 12:41:29 -07:00
parent ec05981a1a
commit cd3d87625f

View File

@@ -233,7 +233,7 @@ var checkSubtree = function (value, pattern) {
checkSubtree(subValue, optionalPatterns[key]);
} else {
if (!unknownKeysAllowed)
throw new Match.Error("Unknown key '" + key + "'");
throw new Match.Error("Unknown key");
}
} catch (err) {
if (err instanceof Match.Error) {