Skip to content

Commit 249b2b9

Browse files
authored
Typo in loader.load() error message (#242)
1 parent 90353d8 commit 249b2b9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/__tests__/abuse.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ describe('Provides descriptive error messages for API abuse', () => {
3636
// $FlowExpectError
3737
idLoader.load();
3838
}).toThrow(
39-
'The loader.load() function must be called with a value,' +
39+
'The loader.load() function must be called with a value, ' +
4040
'but got: undefined.'
4141
);
4242

4343
expect(() => {
4444
// $FlowExpectError
4545
idLoader.load(null);
4646
}).toThrow(
47-
'The loader.load() function must be called with a value,' +
47+
'The loader.load() function must be called with a value, ' +
4848
'but got: null.'
4949
);
5050

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class DataLoader<K, V, C = K> {
7474
load(key: K): Promise<V> {
7575
if (key === null || key === undefined) {
7676
throw new TypeError(
77-
'The loader.load() function must be called with a value,' +
77+
'The loader.load() function must be called with a value, ' +
7878
`but got: ${String(key)}.`
7979
);
8080
}

0 commit comments

Comments
 (0)