[Groonga-commit] groonga/gcs [master] Accept blank string as the domain name (for validation)

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Nov 5 16:16:22 JST 2012


YUKI Hiroshi	2012-11-05 16:16:22 +0900 (Mon, 05 Nov 2012)

  New Revision: 7ce4bdb3b46565981a75c4f362404cd0f77fd44a
  https://github.com/groonga/gcs/commit/7ce4bdb3b46565981a75c4f362404cd0f77fd44a

  Log:
    Accept blank string as the domain name (for validation)

  Modified files:
    lib/database/domain.js

  Modified: lib/database/domain.js (+3 -2)
===================================================================
--- lib/database/domain.js    2012-11-05 16:16:02 +0900 (97e13ca)
+++ lib/database/domain.js    2012-11-05 16:16:22 +0900 (b210417)
@@ -113,11 +113,12 @@ function Domain() {
   var source, context;
   for (var i = 0, maxi = arguments.length, argument; i < maxi; i++) {
     argument = arguments[i];
-    if (!argument) continue;
+    if (argument === null || argument === undefined)
+      continue;
     if (argument instanceof nroonga.Context ||
         argument instanceof nativeNroonga.Database) {
       context = argument;
-    } else if (argument) {
+    } else {
       source = argument;
     }
   }
-------------- next part --------------
HTML����������������������������...
Download 



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