Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fixed empty input in EditMeta modal ; tokens input
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac committed Oct 24, 2016
1 parent cbd8df8 commit bc3319e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/src/modals/EditMeta/editMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ export default class EditMeta extends Component {

const tokens = value.split(/[\s,;]+/);

const newTokens = tokens.slice(0, -1);
const inputValue = tokens.slice(-1)[0];
const newTokens = tokens
.slice(0, -1)
.filter(t => t.length > 0);

const inputValue = tokens.slice(-1)[0].trim();

this.onMetaChange('tags', [].concat(tags, newTokens));
this.refs.tagsInput.setState({ inputValue });
Expand Down

0 comments on commit bc3319e

Please sign in to comment.