This commit is contained in:
Roman Hotsiy 2016-10-14 12:34:44 +03:00
parent 7fee427ba2
commit ad7b236ef7
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 7 additions and 7 deletions

View File

@ -137,16 +137,16 @@ const injectors = {
check: (propertySchema) => (propertySchema.type === 'integer' || propertySchema.type === 'number'),
inject: (injectTo, propertySchema = injectTo) => {
var range = '';
if (propertySchema.minimum != null && propertySchema.maximum != null) {
if (propertySchema.minimum != undefined && propertySchema.maximum != undefined) {
range += propertySchema.exclusiveMinimum ? '( ' : '[ ';
range += propertySchema.minimum;
range += ' .. ';
range += propertySchema.maximum;
range += propertySchema.exclusiveMaximum ? ' )' : ' ]';
} else if (propertySchema.maximum != null) {
} else if (propertySchema.maximum != undefined) {
range += propertySchema.exclusiveMaximum? '< ' : '<= ';
range += propertySchema.maximum;
} else if (propertySchema.minimum != null) {
} else if (propertySchema.minimum != undefined) {
range += propertySchema.exclusiveMinimum ? '> ' : '>= ';
range += propertySchema.minimum;
}
@ -160,11 +160,11 @@ const injectors = {
check: propertySchema => (propertySchema.type === 'string'),
inject: (injectTo, propertySchema = injectTo) => {
var range;
if (propertySchema.minLength != null && propertySchema.maxLength != null) {
if (propertySchema.minLength != undefined && propertySchema.maxLength != undefined) {
range = `[ ${propertySchema.minLength} .. ${propertySchema.maxLength} ]`;
} else if (propertySchema.maxLength != null) {
} else if (propertySchema.maxLength != undefined) {
range = '<= ' + propertySchema.maxLength;
} else if (propertySchema.minLength != null) {
} else if (propertySchema.minLength != undefined) {
range = '>= ' + propertySchema.minLength;
}

View File

@ -60,7 +60,7 @@
"awesome-typescript-loader": "^2.2.1",
"branch-release": "^1.0.3",
"chalk": "^1.1.3",
"codelyzer": "^1.0.0-beta.0",
"codelyzer": "^1.0.0-beta.2",
"copy-webpack-plugin": "^3.0.1",
"core-js": "^2.4.1",
"coveralls": "^2.11.9",