react-redux
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -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() {} } | ||
} | ||
} |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
180071
3319