Skip to content

Commit bc6eb94

Browse files
committedSep 4, 2017
Try ignore mysterious error about docIds not existing..
1 parent 0c028dd commit bc6eb94

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed
 

‎src/components/StemItem.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ function mapStateToProps(state, {docId, canvasItemId}) {
3535
let doc = {}
3636
// Get the document from storage unless docId is not a real doc.
3737
if (!docId.startsWith('emptyItem') && docId !== undefined) {
38-
doc = storage.getDoc(state.storage, docId)
38+
try {
39+
doc = storage.getDoc(state.storage, docId)
40+
} catch (err) {
41+
console.error(err)
42+
return {}
43+
}
3944
}
4045

4146
let canvasItem

‎src/sagas.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ for (let sourceAction in hookedActions) {
3535
function bindHandler(sourceAction, actionHandler) {
3636
return function* actionListener() {
3737
yield* takeEvery(sourceAction, function* (actionObject) {
38-
yield put(actionHandler(actionObject.payload))
38+
try {
39+
yield put(actionHandler(actionObject.payload))
40+
} catch (err) {
41+
console.error(`Error in saga handling ${sourceAction}: ${err}`)
42+
}
3943
})
4044
}
4145
}

0 commit comments

Comments
 (0)
Please sign in to comment.