Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-redux-firebase",
"version": "2.0.5",
"version": "2.0.6",
"description": "Redux integration for Firebase. Comes with a Higher Order Components for use with React.",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
16 changes: 15 additions & 1 deletion src/actions/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export const watchEvent = (firebase, dispatch, options) => {
isQuery,
storeAs
} = options
const { config: { enableLogging, logErrors } } = firebase._

const watchPath = !storeAs ? path : `${path}@${storeAs}`
const id = queryId || getQueryIdFromPath(path)
const counter = getWatcherCount(firebase, type, watchPath, id)
Expand Down Expand Up @@ -159,7 +161,19 @@ export const watchEvent = (firebase, dispatch, options) => {
})
},
err => {
dispatch({ type: actionTypes.ERROR, payload: err })
if (enableLogging || logErrors) {
// eslint-disable-next-line no-console
console.log(
`RRF: Error retrieving data for path: ${path}, storeAs: ${storeAs}. Firebase:`,
err
)
}
dispatch({
type: actionTypes.ERROR,
storeAs,
path,
payload: err
})
}
)
}
Expand Down