Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-saga-final-form

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-saga-final-form - npm Package Compare versions

Comparing version 2.1.0-4 to 2.1.0-5

11

dist/index.js

@@ -7,2 +7,3 @@ "use strict";

const promiseMap = new Map();
const finalFormPromiseId = Symbol('finalFormPromiseId');
function useListener(startActionType, resolveActionType, rejectActionType, setPayload) {

@@ -17,3 +18,3 @@ const dispatch = react_redux_1.useDispatch();

meta: {
final_form_promise: promiseId,
[finalFormPromiseId]: promiseId,
final_form_resolve: resolveActionType,

@@ -32,3 +33,3 @@ final_form_reject: rejectActionType,

return next => action => {
if (action.meta?.final_form_promise) {
if (action.meta?.[finalFormPromiseId]) {
if (!pendingCallbacks.has(action.meta.final_form_resolve)) {

@@ -41,10 +42,10 @@ pendingCallbacks.set(action.meta.final_form_resolve, []);

pendingCallbacks.get(action.meta.final_form_resolve).push({
callback: promiseMap.get(action.meta.final_form_promise).resolve,
callback: promiseMap.get(action.meta[finalFormPromiseId]).resolve,
toClear: action.meta.final_form_reject,
});
pendingCallbacks.get(action.meta.final_form_reject)?.push({
callback: promiseMap.get(action.meta.final_form_promise).reject,
callback: promiseMap.get(action.meta[finalFormPromiseId]).reject,
toClear: action.meta.final_form_resolve
});
promiseMap.delete(action.meta.final_form_promise);
promiseMap.delete(action.meta[finalFormPromiseId]);
}

@@ -51,0 +52,0 @@ const cbInfos = pendingCallbacks.get(action.type);

{
"name": "redux-saga-final-form",
"version": "2.1.0-4",
"version": "2.1.0-5",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -16,2 +16,4 @@ import { useDispatch, useStore } from 'react-redux';

const finalFormPromiseId = Symbol('finalFormPromiseId');
export function useListener(startActionType: string, resolveActionType: string, rejectActionType: string, setPayload?: (payload: any) => Object) {

@@ -26,3 +28,3 @@ const dispatch = useDispatch();

meta: {
final_form_promise: promiseId,
[finalFormPromiseId]: promiseId,
final_form_resolve: resolveActionType,

@@ -42,3 +44,3 @@ final_form_reject: rejectActionType,

return next => action => {
if (action.meta?.final_form_promise) {
if (action.meta?.[finalFormPromiseId]) {
if (!pendingCallbacks.has(action.meta.final_form_resolve)) {

@@ -51,10 +53,10 @@ pendingCallbacks.set(action.meta.final_form_resolve, []);

pendingCallbacks.get(action.meta.final_form_resolve)!.push({
callback: promiseMap.get(action.meta.final_form_promise)!.resolve,
callback: promiseMap.get(action.meta[finalFormPromiseId])!.resolve,
toClear: action.meta.final_form_reject,
})
pendingCallbacks.get(action.meta.final_form_reject)?.push({
callback: promiseMap.get(action.meta.final_form_promise)!.reject,
callback: promiseMap.get(action.meta[finalFormPromiseId])!.reject,
toClear: action.meta.final_form_resolve
});
promiseMap.delete(action.meta.final_form_promise)
promiseMap.delete(action.meta[finalFormPromiseId])
}

@@ -61,0 +63,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc