Socket
Socket
Sign inDemoInstall

react-redux

Package Overview
Dependencies
Maintainers
2
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

dist/react-redux.js

21

es/utils/Subscription.js

@@ -8,2 +8,5 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var CLEARED = null;
var nullListeners = {
notify: function notify() {}
};

@@ -47,6 +50,6 @@ function createListenerCollection() {

this.subscribe = parentSub ? parentSub.addNestedSub.bind(parentSub) : store.subscribe.bind(store);
this.store = store;
this.parentSub = parentSub;
this.unsubscribe = null;
this.listeners = createListenerCollection();
this.listeners = nullListeners;
}

@@ -69,3 +72,6 @@

if (!this.unsubscribe) {
this.unsubscribe = this.subscribe(this.onStateChange);
// this.onStateChange is set by connectAdvanced.initSubscription()
this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
this.listeners = createListenerCollection();
}

@@ -77,9 +83,6 @@ };

this.unsubscribe();
this.unsubscribe = null;
this.listeners.clear();
this.listeners = nullListeners;
}
this.unsubscribe = null;
this.subscribe = null;
this.listeners = {
notify: function notify() {}
};
};

@@ -86,0 +89,0 @@

@@ -12,2 +12,5 @@ "use strict";

var CLEARED = null;
var nullListeners = {
notify: function notify() {}
};

@@ -51,6 +54,6 @@ function createListenerCollection() {

this.subscribe = parentSub ? parentSub.addNestedSub.bind(parentSub) : store.subscribe.bind(store);
this.store = store;
this.parentSub = parentSub;
this.unsubscribe = null;
this.listeners = createListenerCollection();
this.listeners = nullListeners;
}

@@ -73,3 +76,6 @@

if (!this.unsubscribe) {
this.unsubscribe = this.subscribe(this.onStateChange);
// this.onStateChange is set by connectAdvanced.initSubscription()
this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
this.listeners = createListenerCollection();
}

@@ -81,9 +87,6 @@ };

this.unsubscribe();
this.unsubscribe = null;
this.listeners.clear();
this.listeners = nullListeners;
}
this.unsubscribe = null;
this.subscribe = null;
this.listeners = {
notify: function notify() {}
};
};

@@ -90,0 +93,0 @@

{
"name": "react-redux",
"version": "5.0.0",
"version": "5.0.1",
"description": "Official React bindings for Redux",

@@ -11,4 +11,4 @@ "main": "./lib/index.js",

"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/redux.js",
"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/redux.min.js",
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-redux.js",
"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux.min.js",
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",

@@ -15,0 +15,0 @@ "clean": "rimraf lib dist es coverage",

@@ -6,2 +6,3 @@ // encapsulates the subscription logic for connecting a component to the redux store, as

const CLEARED = null
const nullListeners = { notify() {} }

@@ -45,8 +46,6 @@ function createListenerCollection() {

constructor(store, parentSub) {
this.subscribe = parentSub
? parentSub.addNestedSub.bind(parentSub)
: store.subscribe.bind(store)
this.store = store
this.parentSub = parentSub
this.unsubscribe = null
this.listeners = createListenerCollection()
this.listeners = nullListeners
}

@@ -69,3 +68,8 @@

if (!this.unsubscribe) {
this.unsubscribe = this.subscribe(this.onStateChange)
// this.onStateChange is set by connectAdvanced.initSubscription()
this.unsubscribe = this.parentSub
? this.parentSub.addNestedSub(this.onStateChange)
: this.store.subscribe(this.onStateChange)
this.listeners = createListenerCollection()
}

@@ -77,8 +81,7 @@ }

this.unsubscribe()
this.unsubscribe = null
this.listeners.clear()
this.listeners = nullListeners
}
this.unsubscribe = null
this.subscribe = null
this.listeners = { notify() {} }
}
}
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