Skip to content

Commit

Permalink
Typo in loader.load() error message (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caerbannog authored May 26, 2020
1 parent 90353d8 commit 249b2b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/abuse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ describe('Provides descriptive error messages for API abuse', () => {
// $FlowExpectError
idLoader.load();
}).toThrow(
'The loader.load() function must be called with a value,' +
'The loader.load() function must be called with a value, ' +
'but got: undefined.'
);

expect(() => {
// $FlowExpectError
idLoader.load(null);
}).toThrow(
'The loader.load() function must be called with a value,' +
'The loader.load() function must be called with a value, ' +
'but got: null.'
);

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class DataLoader<K, V, C = K> {
load(key: K): Promise<V> {
if (key === null || key === undefined) {
throw new TypeError(
'The loader.load() function must be called with a value,' +
'The loader.load() function must be called with a value, ' +
`but got: ${String(key)}.`
);
}
Expand Down

0 comments on commit 249b2b9

Please # to comment.