mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Merge pull request #1481 from andyklimczak/1476-tag-check
Remove leading # when creating tag
This commit is contained in:
@@ -64,7 +64,8 @@ class TagSelect extends React.Component {
|
||||
submitTag () {
|
||||
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_TAG')
|
||||
let { value } = this.props
|
||||
const newTag = this.refs.newTag.value.trim().replace(/ +/g, '_')
|
||||
let newTag = this.refs.newTag.value.trim().replace(/ +/g, '_')
|
||||
newTag = newTag.charAt(0) === '#' ? newTag.substring(1) : newTag
|
||||
|
||||
if (newTag.length <= 0) {
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user