wappsto-redux
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -180,3 +180,3 @@ import querystring from 'query-string'; | ||
function findRequest(state, url, data, options) { | ||
function findRequest(state, url, method, data, options) { | ||
for (let id in state.request) { | ||
@@ -188,3 +188,5 @@ const stateRequest = state.request[id]; | ||
const query = options.query ? { ...options.query, ...parsedUrl.query } : parsedUrl.query; | ||
if (equal(rUrl.url, parsedUrl.url) | ||
if (stateRequest.status === 'pending' | ||
&& stateRequest.method === method | ||
&& equal(rUrl.url, parsedUrl.url) | ||
&& equal(rQuery, query) | ||
@@ -213,3 +215,3 @@ && equal(stateRequest.data, data)) { | ||
const state = getState(); | ||
const existingRequest = findRequest(state, url, data, options); | ||
const existingRequest = findRequest(state, url, method, data, options); | ||
if (existingRequest) { | ||
@@ -216,0 +218,0 @@ return existingRequest; |
{ | ||
"name": "wappsto-redux", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import { normalize } from 'normalizr'; | ||
import equal from 'deep-equal'; | ||
@@ -60,3 +61,3 @@ import { | ||
result = newData.result; | ||
if(element){ | ||
if(element && !equal(element[child], data.map(i => i.meta.id))){ | ||
const newElement = Object.assign({}, element); | ||
@@ -69,3 +70,3 @@ newElement[child] = reset ? result : mergeUnique(element[child], result); | ||
result = newData.result; | ||
if(element){ | ||
if(element && !equal(element[child], data.meta.id)){ | ||
const newElement = Object.assign({}, element); | ||
@@ -72,0 +73,0 @@ newElement[child] = result; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49659
1266