Skip to content

Commit

Permalink
fix: fix utils
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 1, 2018
1 parent 226dbe2 commit 9d60a17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export function hasValue(s) {
}

export function removeAfter(delimiter, str) {
return first(str.split(delimiter));
return first(str.split(delimiter)) || '';
}

export function removeBefore() {
return (delimiter, str) => last(str.split(delimiter));
export function removeBefore(delimiter, str) {
return last(str.split(delimiter)) || '';
}

export const range = (len) => {
Expand Down

0 comments on commit 9d60a17

Please sign in to comment.