remote url changed
This commit is contained in:
12
src/index.js
12
src/index.js
@@ -32,14 +32,6 @@ let Global = class {
|
||||
window.dispatchEvent(event)
|
||||
}
|
||||
|
||||
async fetchAppData() {
|
||||
let personalSpace = this.currentNetwork === this.profile
|
||||
if (personalSpace) { return {} }
|
||||
let appData = await fetch(`${util.HOST}/api/${personalSpace ? "my" : "org"}data/` + this.currentNetwork.id, {method: "GET"})
|
||||
let json = await appData.json()
|
||||
return json
|
||||
}
|
||||
|
||||
onNavigate = async () => {
|
||||
if(!global.profile) return
|
||||
let selectedNetwork = this.networkFromPath()
|
||||
@@ -72,10 +64,6 @@ let Global = class {
|
||||
window.dispatchEvent(event)
|
||||
}
|
||||
|
||||
if(!this.currentNetwork?.data) {
|
||||
this.currentNetwork.data = await this.fetchAppData()
|
||||
}
|
||||
|
||||
if(appChanged && !networkChanged) {
|
||||
const event = new CustomEvent('appchange', {
|
||||
detail: { name: this.currentApp() }
|
||||
|
||||
Reference in New Issue
Block a user