Skip to content

Commit

Permalink
Fix a context example typo
Browse files Browse the repository at this point in the history
Fixes #1112
  • Loading branch information
szmarczak committed Mar 10, 2020
1 parent 1cddd52 commit 982275e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const instance = got.extend({
hooks: {
beforeRequest: [
options => {
if (!options.context && !options.context.token) {
if (!options.context || !options.context.token) {
throw new Error('Token required');
}

Expand Down

0 comments on commit 982275e

Please sign in to comment.