Skip to content

Commit

Permalink
Fix missing variable
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Nov 21, 2012
1 parent acdef01 commit ace939f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/api/2011-02-01/configuration.js
Expand Up @@ -334,11 +334,11 @@ function assertHaveNoMismatchedTypeOption(request, type) {
});

if (type == 'text' && (literalOptions.length || uintOptions.length))
throw new error.FieldOptionConflictError('A text IndexField may only specify textOptions');
throw new errors.FieldOptionConflictError('A text IndexField may only specify textOptions');
if (type == 'literal' && (textOptions.length || uintOptions.length))
throw new error.FieldOptionConflictError('A literal IndexField may only specify literalOptions');
throw new errors.FieldOptionConflictError('A literal IndexField may only specify literalOptions');
if (type == 'uint' && (textOptions.length || literalOptions.length))
throw new error.FieldOptionConflictError('A uint IndexField may only specify uintOptions');
throw new errors.FieldOptionConflictError('A uint IndexField may only specify uintOptions');
}

handlers.DefineIndexField = function(context, request, response, config) {
Expand All @@ -352,11 +352,11 @@ handlers.DefineIndexField = function(context, request, response, config) {
var fieldName = request.query['IndexField.IndexFieldName'] || '';
var fieldType = request.query['IndexField.IndexFieldType'] || '';
var field = handleIndexFieldValidationError(function() {
var field = domain.getIndexField(fieldName).setType(fieldType).validate();
assertHaveNoMismatchedTypeOption(request, fieldType);
return field;
return domain.getIndexField(fieldName).setType(fieldType).validate();
});

assertHaveNoMismatchedTypeOption(request, fieldType);

var facetEnabled = getFieldOption('FacetEnabled', request, fieldType);
if (facetEnabled !== undefined)
field.facetEnabled = facetEnabled.toLowerCase() == 'true';
Expand Down

0 comments on commit ace939f

Please sign in to comment.