Skip to content

Commit

Permalink
remove last char if useless
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanedemotte committed Mar 24, 2018
1 parent b9b5b1e commit c3e735a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/js/origin-acf-field-slug.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@

var onType = function() {
var value = acf.str_sanitize(this.value)
if(value.slice(-1) == '_')
value = value.slice(0, -1)
value = value.split('_').join('-')
$input.val(value)
removeLink()
Expand Down

0 comments on commit c3e735a

Please sign in to comment.