summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 2e0e26f55c..f443e52436 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1491,10 +1491,10 @@ $(function () {
// Parse SSH Key
$("#ssh-key-content").on('change paste keyup',function(){
- var value = $(this).val();
- var arrays = value.split(" ");
- if (arrays.length === 3 && arrays[2] !== "") {
- $("#ssh-key-title").val(arrays[2]);
+ var arrays = $(this).val().split(" ");
+ var $title = $("#ssh-key-title")
+ if ($title.val() === "" && arrays.length === 3 && arrays[2] !== "") {
+ $title.val(arrays[2]);
}
});
});