[Groonga-commit] groonga/gcs [master] Return "hasXXX" values correctly for index field options

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 21 20:37:11 JST 2012


YUKI Hiroshi	2012-11-21 20:37:11 +0900 (Wed, 21 Nov 2012)

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

  Log:
    Return "hasXXX" values correctly for index field options

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

  Modified: lib/database/index-field.js (+4 -4)
===================================================================
--- lib/database/index-field.js    2012-11-21 20:34:46 +0900 (e393d9c)
+++ lib/database/index-field.js    2012-11-21 20:37:11 +0900 (6798587)
@@ -262,7 +262,7 @@ IndexField.prototype = {
     return null;
   },
   get hasDefaultValue() {
-    return this.domain.getConfiguration(this.defaultValueConfigurationKey) !== null;
+    return this.domain.getConfiguration(this.defaultValueConfigurationKey) !== undefined;
   },
   get defaultValueConfigurationKey() {
     return 'column_' + this.name + '_option_default_value';
@@ -292,7 +292,7 @@ IndexField.prototype = {
     return this;
   },
   get hasFacetEnabled() {
-    return this.domain.getConfiguration(this.facetEnabledConfigurationKey) !== null;
+    return this.domain.getConfiguration(this.facetEnabledConfigurationKey) !== undefined;
   },
   get facetEnabledConfigurationKey() {
     return 'column_' + this.name + '_option_facet_enabled';
@@ -321,7 +321,7 @@ IndexField.prototype = {
     return this;
   },
   get hasResultEnabled() {
-    return this.domain.getConfiguration(this.resultEnabledConfigurationKey) !== null;
+    return this.domain.getConfiguration(this.resultEnabledConfigurationKey) !== undefined;
   },
   get resultEnabledConfigurationKey() {
     return 'column_' + this.name + '_option_result_enabled';
@@ -351,7 +351,7 @@ IndexField.prototype = {
     return this;
   },
   get hasSearchEnabled() {
-    return this.domain.getConfiguration(this.searchEnabledConfigurationKey) !== null;
+    return this.domain.getConfiguration(this.searchEnabledConfigurationKey) !== undefined;
   },
   get searchEnabledConfigurationKey() {
     return 'column_' + this.name + '_option_search_enabled';
-------------- next part --------------
HTML����������������������������...
下载 



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