summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/resources
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/resources')
-rw-r--r--chrome/renderer/resources/extensions/json_schema.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/chrome/renderer/resources/extensions/json_schema.js b/chrome/renderer/resources/extensions/json_schema.js
index 3c6f394..4b8996a 100644
--- a/chrome/renderer/resources/extensions/json_schema.js
+++ b/chrome/renderer/resources/extensions/json_schema.js
@@ -53,10 +53,6 @@ function isOptionalValue(value) {
return typeof(value) === 'undefined' || value === null;
}
-function enumToString(enumValue) {
- return enumValue.name || enumValue;
-}
-
/**
* Validates an instance against a schema and accumulates errors. Usage:
*
@@ -321,12 +317,11 @@ JSONSchemaValidator.prototype.validateChoices =
*/
JSONSchemaValidator.prototype.validateEnum = function(instance, schema, path) {
for (var i = 0; i < schema.enum.length; i++) {
- if (instance === enumToString(schema.enum[i]))
+ if (instance === schema.enum[i])
return true;
}
- this.addError(path, "invalidEnum",
- [schema.enum.map(enumToString).join(", ")]);
+ this.addError(path, "invalidEnum", [schema.enum.join(", ")]);
return false;
};