[Groonga-commit] groonga/gcs [master] Validate index field type only when it is given

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 21 18:40:27 JST 2012


YUKI Hiroshi	2012-11-21 18:40:27 +0900 (Wed, 21 Nov 2012)

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

  Log:
    Validate index field type only when it is given

  Modified files:
    lib/database/index-field.js

  Modified: lib/database/index-field.js (+2 -2)
===================================================================
--- lib/database/index-field.js    2012-11-21 18:36:03 +0900 (a496282)
+++ lib/database/index-field.js    2012-11-21 18:40:27 +0900 (e4162db)
@@ -130,10 +130,10 @@ IndexField.prototype = {
   validate: function() {
     if (typeof this.name != 'string')
       throw new ValidationError('field name must be a string');
-    if (typeof this.type != 'string')
+    if (typeof this._type != 'string')
       throw new ValidationError('field type must be a string');
 
-    var errors = collectTypeValidationErrors(this.type)
+    var errors = collectTypeValidationErrors(this._type)
                    .concat(collectNameValidationErrors(this.name));
     if (errors.length) {
       var prefix = errors.length > 1 ? 
-------------- next part --------------
HTML����������������������������...
다운로드 



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