diff --git a/packages/client/src/pizzax.ts b/packages/client/src/pizzax.ts index 4bc3706e91..a0c9a1badf 100644 --- a/packages/client/src/pizzax.ts +++ b/packages/client/src/pizzax.ts @@ -2,6 +2,7 @@ import { onUnmounted, Ref, ref, watch } from 'vue'; import { $i } from './account'; import { api } from './os'; import { get, set } from './scripts/idb-proxy'; +import { defaultStore } from './store'; import { stream } from './stream'; type StateDef = Record { } } - private async load(): Promise { + private load(): Promise { return new Promise((resolve, reject) => { if ($i) { // api関数と循環参照なので一応setTimeoutしておく - setTimeout(() => { + setTimeout(async () => { + await defaultStore.ready; + api('i/registry/get-all', { scope: ['client', this.key] }) .then(kvs => { const cache = {};