diff --git a/src/__tests__/abuse.test.js b/src/__tests__/abuse.test.js index f2bb0dc..9300e80 100644 --- a/src/__tests__/abuse.test.js +++ b/src/__tests__/abuse.test.js @@ -36,7 +36,7 @@ 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.' ); @@ -44,7 +44,7 @@ describe('Provides descriptive error messages for API abuse', () => { // $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.' ); diff --git a/src/index.js b/src/index.js index f5f4e15..6250df9 100644 --- a/src/index.js +++ b/src/index.js @@ -74,7 +74,7 @@ class DataLoader { load(key: K): Promise { 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)}.` ); }