Skip to content

Commit c5e88fc

Browse files
committed
fix: Don't overwrite ssh key title if exist.
1 parent 4f0bb3a commit c5e88fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public/js/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,8 @@ $(function () {
14931493
$("#ssh-key-content").on('change paste keyup',function(){
14941494
var value = $(this).val();
14951495
var arrays = value.split(" ");
1496-
if (arrays.length === 3 && arrays[2] !== "") {
1496+
var $title = $("#ssh-key-title")
1497+
if ($title.val() === "" && arrays.length === 3 && arrays[2] !== "") {
14971498
$("#ssh-key-title").val(arrays[2]);
14981499
}
14991500
});

0 commit comments

Comments
 (0)