Skip to content

Commit

Permalink
feat: properly capitalize error messages
Browse files Browse the repository at this point in the history
I actually just want to release a new version
  • Loading branch information
Ari Porad committed Dec 8, 2015
1 parent 03a3200 commit 7c05c2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -54,15 +54,15 @@ export function addReducer(key, newReducer) {
function addActionType(key, value = key, creator = () => ({ type: value })) {
let create;
let val;
if (typeof key !== 'string') throw new Error('key must be a string');
if (typeof key !== 'string') throw new Error('Key must be a string.');
if (typeof value === 'function') {
create = value;
val = key;
} else {
val = value;
create = creator;
}
if (typeof val !== 'string') throw new Error('value must be a string');
if (typeof val !== 'string') throw new Error('Value must be a string.');
const createKey = camelCase(key);
const constKey = key.toUpperCase().replace(' ', '_');

Expand Down

0 comments on commit 7c05c2a

Please sign in to comment.