Skip to content

Commit

Permalink
fix: getSpecialName / code to uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
singuerinc committed Feb 25, 2019
1 parent f549560 commit b0a41de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/getSpecialCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function getSpecialCode(value) {

const [code] = _partsSpecial(str);

return SPECIALS[code] ? code : null;
return code ? (SPECIALS[code.toUpperCase()] ? code.toUpperCase() : null) : null;
}

export { getSpecialCode };
2 changes: 1 addition & 1 deletion src/getSpecialName.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function getSpecialName(value) {
const str = !value ? "" : value;
const code = getSpecialCode(str);

return SPECIALS[code] || null;
return code ? SPECIALS[code.toUpperCase()] : null;
}

export { getSpecialName };

0 comments on commit b0a41de

Please sign in to comment.