Fix serious BUG

v1 uses `uri`, v2 uses `domain`
This commit is contained in:
Lim Chee Aun 2022-12-26 23:44:18 +08:00
parent 1329baec7b
commit d981a31a10

View file

@ -308,9 +308,9 @@ export function App() {
(async () => {
const info = await masto.v2.instance.fetch();
console.log(info);
const { uri } = info;
const { uri, domain } = info;
const instances = store.local.getJSON('instances') || {};
instances[uri] = info;
instances[domain || uri] = info;
store.local.setJSON('instances', instances);
})();
});