btford / btford/react-palm

withTask throw error when lastWithTaskCall is null

Open
#18 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
60
Forks
7
PR merge metrics
No merged PRs in 30d

Description

in task.js
`function withTask(state, task) {
if (!module.hot && enableStackCapture && !lastWithTaskCall) {
lastWithTaskCall = trace(IMPROPER_TASK_USAGE);
}
...
`

should the condition be `lastWithTaskCall` being thuthy? This is causing exceptions being thrown in production and the entire app breaks.

Interestingly, we don't see this error on local because
a. `module.hot` is always truthy
b. `try {
throw new Error(message);
}` sometimes fails

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.