Prevent saving empty key

This commit is contained in:
Alan Friedman 2016-01-12 20:16:09 -05:00
parent 5e2a9e2ac0
commit c4630fff8a

View File

@ -449,7 +449,8 @@ $(function() {
function saveKey() { function saveKey() {
$('.edit-key').hide(); $('.edit-key').hide();
$('.read-key').show(); $('.read-key').show();
updateKeyVal($('.edit-key input.key').val()); var key = $('.edit-key input.key').val().trim();
updateKeyVal(key || encryptionKey);
} }
$('#join-modal .modal-footer button').click(function() { $('#join-modal .modal-footer button').click(function() {