[Groonga-commit] groonga/gcs [master] Fix error around undefined (or null) request.url

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 12日 (木) 16:49:25 JST


SHIMODA Hiroshi	2012-07-12 16:49:25 +0900 (Thu, 12 Jul 2012)

  New Revision: 73332757ed85989f119bfb7561d8c777b4e0eaa6
  https://github.com/groonga/gcs/commit/73332757ed85989f119bfb7561d8c777b4e0eaa6

  Log:
    Fix error around undefined (or null) request.url

  Modified files:
    lib/database/domain.js

  Modified: lib/database/domain.js (+5 -3)
===================================================================
--- lib/database/domain.js    2012-07-12 16:47:59 +0900 (4bb7351)
+++ lib/database/domain.js    2012-07-12 16:49:25 +0900 (987945a)
@@ -71,9 +71,11 @@ Domain.prototype = {
         return domainNameFromHost;
     }
 
-    var domainNameFromPath = Domain.getNameFromPath(source.url);
-    if (domainNameFromPath)
-      return domainNameFromPath;
+    if (source.url) {
+      var domainNameFromPath = Domain.getNameFromPath(source.url);
+      if (domainNameFromPath)
+        return domainNameFromPath;
+    }
 
     throw new Error('no domain name');
   },
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Descargar 



Groonga-commit メーリングリストの案内
Back to archive index