diff options
Diffstat (limited to 'misc/machine-name.js')
-rw-r--r-- | misc/machine-name.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/misc/machine-name.js b/misc/machine-name.js index 2691c3b73..3f8e788a2 100644 --- a/misc/machine-name.js +++ b/misc/machine-name.js @@ -77,9 +77,11 @@ Drupal.behaviors.machineName = { $source.bind('keyup.machineName change.machineName', function () { machine = self.transliterate($(this).val(), options); // Set the machine name to the transliterated value. - if (machine != options.replace && machine != '') { - $target.val(machine); - $preview.text(machine); + if (machine != '') { + if (machine != options.replace) { + $target.val(machine); + $preview.text(machine); + } $suffix.show(); } else { |