[Groonga-commit] groonga/gcs [master] Fix missing variable

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 21 19:12:31 JST 2012


YUKI Hiroshi	2012-11-21 19:12:31 +0900 (Wed, 21 Nov 2012)

  New Revision: ace939f70c2db045fa0e08c16590e5aedfc9f7df
  https://github.com/groonga/gcs/commit/ace939f70c2db045fa0e08c16590e5aedfc9f7df

  Log:
    Fix missing variable

  Modified files:
    lib/api/2011-02-01/configuration.js

  Modified: lib/api/2011-02-01/configuration.js (+6 -6)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-11-21 19:10:25 +0900 (d838816)
+++ lib/api/2011-02-01/configuration.js    2012-11-21 19:12:31 +0900 (4f1ebdc)
@@ -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) {
@@ -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';
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index