fix(user-menu) hide load on error

This commit is contained in:
coderaiser 2019-08-15 23:49:08 +03:00
parent f989880d48
commit bba2f7b570

View file

@ -47,6 +47,8 @@ async function show() {
const res = await fetch(`${CloudCmd.prefix}/api/v1/user-menu?dir=${dirPath}`);
const [error, userMenu] = tryCatch(getUserMenu, await res.text());
Images.hide();
if (error)
return Dialog.alert(`User menu error: ${error.message}`);
@ -74,8 +76,6 @@ async function show() {
const afterShow = () => select.focus();
const autoSize = true;
Images.hide();
CloudCmd.View.show([button, select], {
autoSize,
afterShow,