Skip to content

Commit

Permalink
fix: allow empty node name/location #463 (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored May 12, 2020
1 parent d179286 commit e90aeb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,14 @@ export default {
val || this.closeDialog()
},
newName (val) {
var match = val ? val.match(/[a-zA-Z0-9_-]+/g) : []
var match = val ? val.match(/[a-zA-Z0-9_-]+/g) : [val]
this.nameError = match[0] !== val
? 'Only a-zA-Z0-9_- chars are allowed'
: null
},
newLoc (val) {
var match = val ? val.match(/[a-zA-Z0-9_-]+/g) : []
var match = val ? val.match(/[a-zA-Z0-9_-]+/g) : [val]
this.locError = match[0] !== val
? 'Only a-zA-Z0-9_- chars are allowed'
Expand Down

0 comments on commit e90aeb6

Please sign in to comment.