c6205c84da7c9f650587fca703ff83fddf8db693 chmalee Fri Oct 31 16:25:53 2025 -0700 Do not send the async request to get hubSpace ui state on page load if the user is not logged in, refs Max discussion diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js index 7096a131b6b..a39a5bfc2e5 100644 --- src/hg/js/hgMyData.js +++ src/hg/js/hgMyData.js @@ -1493,29 +1493,31 @@ function handleErrorState(jqXHR, textStatus) { cart.defaultErrorCallback(jqXHR, textStatus); } let inited = false; // keep track of first init for tab switching purposes function init() { cart.setCgiAndUrl(fileListEndpoint); cart.debug(debugCartJson); // get the file list immediately upon page load let activeTab = $("#tabs").tabs( "option", "active" ); if (activeTab === 3) { let url = new URL(window.location.href); if (url.protocol === "http:") { warn(`The hub upload feature is only available over HTTPS. Please load the HTTPS version of ` + `our site: <a href="https:${url.host}${url.pathname}${url.search}">https:${url.host}${url.pathname}${url.search}</a>`); - } else if (!inited) { + } else if (!inited && isLoggedIn) { cart.send({ getHubSpaceUIState: {}}, handleRefreshState, handleErrorState); cart.flush(); + } else { + showExistingFiles([]); } } } return { init: init, uiState: uiState, defaultDb: defaultDb, makeGenomeSelectOptions: makeGenomeSelectOptions, detectFileType: detectFileType, }; }());