[BUG] Does not handle `undefined` return value from signal-exit's onExit() function
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- electron, javascript, node.js
- Domain
- tooling
Research direction
Start in index.js around line 254, then review the linked signal-exit source to understand when onExit() can return undefined. Reproduce the Electron-related path and verify that write-file-atomic completes without attempting to call an undefined value.
Written by the indexing model from the issue text.
Description
According to the documentation of signal-exit the onExit function always returns a function. But according to the actual source code this is not true. The function can return undefined in specific circumstances (I encounter this within Electron) and write-file-atomic fails when trying to call this undefined function.
I guess the function call should be wrapped with a null check.
- Dominant language
- JavaScript
- Stars
- 256
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from npm/write-file-atomic
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
npm/write-file-atomic#245 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
npm/write-file-atomic#243 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
npm/write-file-atomic#224 ·
-
PornographyOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
npm/write-file-atomic#189 · 6 reactions ·
-
Bug Needs Triage
Difficulty 3/5 1-2 days Newbie friendliness 35/100
npm/write-file-atomic#163 ·
All issues in npm/write-file-atomic
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
scratchfoundation/scratch-editor#754 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 96/100
google/site-kit-wp#14102 ·
Maintainers usually reply within 2 days
-
area:growth priority:P1 type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
tecnologiasantos/bogoboom#66 ·
Maintainers usually reply within 1 day
-
desktop docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ktwu01/benchmark-radar#1181 ·
Maintainers usually reply within 1 day