Skip to content

Commit 51fc305

Browse files
committed
fixes
1 parent ae9c19f commit 51fc305

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

package.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "react-redux-firebase",
33
"version": "2.0.0-rc.1",
4-
"description": "Redux integration for Firebase. Comes with a Higher Order Components for use with React.",
4+
"description":
5+
"Redux integration for Firebase. Comes with a Higher Order Components for use with React.",
56
"main": "lib/index.js",
67
"module": "es/index.js",
78
"jsnext:main": "es/index.js",
@@ -16,19 +17,25 @@
1617
"codecov": "cat coverage/lcov.info | codecov",
1718
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
1819
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
19-
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-redux-firebase.js",
20-
"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
21-
"build:size": "cross-env SIZE=true BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
22-
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",
23-
"watch": "npm run build:commonjs -- --watch",
20+
"build:umd":
21+
"cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-redux-firebase.js",
22+
"build:umd:min":
23+
"cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
24+
"build:size":
25+
"cross-env SIZE=true BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
26+
"build":
27+
"npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",
28+
"watch": "npm run build:es -- --watch",
2429
"prepare": "npm run clean && npm run build",
2530
"prepush": "npm run lint",
2631
"docs:clean": "rimraf _book",
2732
"docs:prepare": "gitbook install",
2833
"docs:api": "node bin/api-docs-generate",
29-
"docs:build": "npm run docs:prepare && gitbook build -g prescottprue/react-redux-firebase && npm run docs:api",
34+
"docs:build":
35+
"npm run docs:prepare && gitbook build -g prescottprue/react-redux-firebase && npm run docs:api",
3036
"docs:watch": "npm run docs:prepare && gitbook serve",
31-
"docs:publish": "npm run docs:clean && npm run docs:build && cp CNAME _book && cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push git@github.com:prescottprue/react-redux-firebase gh-pages --force",
37+
"docs:publish":
38+
"npm run docs:clean && npm run docs:build && cp CNAME _book && cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push git@github.com:prescottprue/react-redux-firebase gh-pages --force",
3239
"docs:upload": "node bin/api-docs-upload"
3340
},
3441
"license": "MIT",

src/firestoreConnect.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,13 @@ export const createFirestoreConnect = (storeKey = 'store') => (
5858
const { firebase, firestore } = this.store
5959
const inputAsFunc = createCallable(dataOrFn)
6060
const data = inputAsFunc(np, this.store)
61-
6261
// Handle a data parameter having changed
6362
if (firebase.firestore && !isEqual(data, this.prevData)) {
64-
this.prevData = data
6563
// UnWatch all current events
6664
firestore.unsetListeners(this.prevData)
65+
this.prevData = data
6766
// Watch new events
68-
firestore.setListeners(this.prevData)
67+
firestore.setListeners(data)
6968
}
7069
}
7170

0 commit comments

Comments
 (0)