realm logo: Fix realm logo unsupported file upload bug.

Unable to upload a realm logo once we encounter file input error bug
was fixed by clearing `get_file_input()` after file input error
with `get_file_input().val('')`.

The previous .clone() logic was preserved over many years but
apparently was also just wrong.

Fixes #15198
This commit is contained in:
jagansivam28
2020-06-05 02:32:28 +05:30
committed by Tim Abbott
parent 0797626911
commit 44995e36df

View File

@@ -136,8 +136,7 @@ exports.build_direct_upload_widget = function (
function clear() {
const control = get_file_input();
const new_control = control.clone(true);
control.replaceWith(new_control);
control.val('');
}
upload_button.on('drop', function (e) {