null+****@clear*****
null+****@clear*****
2012年 7月 12日 (木) 16:47:59 JST
SHIMODA Hiroshi 2012-07-12 16:47:59 +0900 (Thu, 12 Jul 2012) New Revision: 76965471140bfef9f04565174698bd3690fae38d https://github.com/groonga/gcs/commit/76965471140bfef9f04565174698bd3690fae38d Log: Fix auto detection of arguments of Domain Modified files: lib/database/domain.js Modified: lib/database/domain.js (+4 -3) =================================================================== --- lib/database/domain.js 2012-07-12 16:46:06 +0900 (b7b3511) +++ lib/database/domain.js 2012-07-12 16:47:59 +0900 (4bb7351) @@ -33,14 +33,15 @@ function assertValidDomainName(domain) { // new Domain("source", context) or new Domain(context, "source") function Domain() { var source, context; - Array.prototype.forEach.apply(arguments, function(argument) { - if (!argument) return; + for (var i = 0, maxi = arguments.length, argument; i < maxi; i++) { + argument = arguments[1]; + if (!argument) continue; if (argument instanceof nroonga.Context) { context = argument; } else if (argument) { source = argument; } - }); + } if (source instanceof Domain) return source; -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...Download