couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1176679 - in /couchdb/branches/1.1.x: ./ etc/default/couchdb share/server/util.js
Date Wed, 28 Sep 2011 01:14:56 GMT
Author: davisp
Date: Wed Sep 28 01:14:56 2011
New Revision: 1176679

URL: http://svn.apache.org/viewvc?rev=1176679&view=rev
Log:
Allow CommonJS modules to be an empty string.

We were making a typical JavaScript mistake testing a module for
truthiness instead of checking that it was undefined.

Fixes COUCHDB-1223
Backport of r1176677 from trunk


Modified:
    couchdb/branches/1.1.x/   (props changed)
    couchdb/branches/1.1.x/etc/default/couchdb   (props changed)
    couchdb/branches/1.1.x/share/server/util.js

Propchange: couchdb/branches/1.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 28 01:14:56 2011
@@ -6,4 +6,4 @@
 /couchdb/branches/list-iterator:782292-784593
 /couchdb/branches/tail_header:775760-778477
 /couchdb/tags/0.10.0:825400
-/couchdb/trunk:1045203,1064417,1081107-1083320,1083714,1095523,1095557,1095569,1095581,1096098,1097300,1099479,1102006,1156506-1156509,1156610,1164350
+/couchdb/trunk:1045203,1064417,1081107-1083320,1083714,1095523,1095557,1095569,1095581,1096098,1097300,1099479,1102006,1156506-1156509,1156610,1164350,1176677

Propchange: couchdb/branches/1.1.x/etc/default/couchdb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 28 01:14:56 2011
@@ -6,5 +6,5 @@
 /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593
 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477
 /couchdb/tags/0.10.0/etc/default/couchdb:825400
-/couchdb/trunk/etc/default/couchdb:1045203,1064417,1081107-1083320,1083714,1095523,1095557,1095569,1095581,1096098,1097300,1099479,1102006,1156506-1156509,1156610,1164350
+/couchdb/trunk/etc/default/couchdb:1045203,1064417,1081107-1083320,1083714,1095523,1095557,1095569,1095581,1096098,1097300,1099479,1102006,1156506-1156509,1156610,1164350,1176677
 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440

Modified: couchdb/branches/1.1.x/share/server/util.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/share/server/util.js?rev=1176679&r1=1176678&r2=1176679&view=diff
==============================================================================
--- couchdb/branches/1.1.x/share/server/util.js (original)
+++ couchdb/branches/1.1.x/share/server/util.js Wed Sep 28 01:14:56 2011
@@ -46,7 +46,7 @@ var resolveModule = function(names, mod,
   } else if (root) {
     mod = {current : root};
   }
-  if (!mod.current[n]) {
+  if (mod.current[n] === undefined) {
     throw ["error", "invalid_require_path", 'Object has no property "'+n+'". '+JSON.stringify(mod.current)];
   }
   return resolveModule(names, {



Mime
View raw message