Author: cmlenz
Date: Wed Jul 22 10:11:42 2009
New Revision: 796658

URL: http://svn.apache.org/viewvc?rev=796658&view=rev
Log:
Avoid usage of `Array.indexOf` function, which is not available on IE (and not 
yet part of any final ECMAScript standard).

Modified:
    couchdb/trunk/share/www/script/jquery.couch.js

Modified: couchdb/trunk/share/www/script/jquery.couch.js
URL: 
http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.couch.js?rev=796658&r1=796657&r2=796658&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Wed Jul 22 10:11:42 
2009
@@ -289,10 +289,10 @@
     var buf = [];
     if (typeof(options) === "object" && options !== null) {
       for (var name in options) {
-        if (~["error", "success"].indexOf(name))
+        if ($.inArray(name, ["error", "success"]) >= 0)
           continue;
         var value = options[name];
-        if (~["key", "startkey", "endkey"].indexOf(name)) {
+        if ($.inArray(name, ["key", "startkey", "endkey"]) >= 0) {
           value = toJSON(value);
         }
         buf.push(encodeURIComponent(name) + "=" + encodeURIComponent(value));


Reply via email to