You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/04/04 13:32:17 UTC

[GitHub] Antonio-Maranhao closed pull request #1072: Fix query options reducer code

Antonio-Maranhao closed pull request #1072: Fix query options reducer code
URL: https://github.com/apache/couchdb-fauxton/pull/1072
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/app/addons/documents/index-results/reducers.js b/app/addons/documents/index-results/reducers.js
index b37b85d38..2f90d3a1f 100644
--- a/app/addons/documents/index-results/reducers.js
+++ b/app/addons/documents/index-results/reducers.js
@@ -325,18 +325,11 @@ export const getQueryOptionsParams = (state) => {
   // Only add UPDATE and STABLE parameters when different than
   // their respective default values. This prevent errors in
   // older CouchDB versions that don't support these parameters.
-  if (queryOptionsPanel.update !== undefined) {
-    // Default value is 'true'
-    if (queryOptionsPanel.update !== 'true') {
-      params.update = queryOptionsPanel.update;
-    }
+  if (queryOptionsPanel.update !== undefined && queryOptionsPanel.update !== 'true') {
+    params.update = queryOptionsPanel.update;
   }
-
-  if (typeof queryOptionsPanel.stable === 'boolean') {
-    // Default value is false
-    if (queryOptionsPanel.stable === true) {
-      params.stable = queryOptionsPanel.stable;
-    }
+  if (queryOptionsPanel.stable === true) {
+    params.stable = queryOptionsPanel.stable;
   }
 
   return params;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services