about summary refs log tree commit diff
path: root/src/state/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/index.ts')
-rw-r--r--src/state/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/index.ts b/src/state/index.ts
index 5c8b50ef1..78fba2ecf 100644
--- a/src/state/index.ts
+++ b/src/state/index.ts
@@ -13,13 +13,13 @@ export const DEFAULT_SERVICE = PROD_SERVICE
 const ROOT_STATE_STORAGE_KEY = 'root'
 const STATE_FETCH_INTERVAL = 15e3
 
-export async function setupState() {
+export async function setupState(serviceUri = DEFAULT_SERVICE) {
   let rootStore: RootStoreModel
   let data: any
 
   libapi.doPolyfill()
 
-  const api = AtpApi.service(DEFAULT_SERVICE) as SessionServiceClient
+  const api = AtpApi.service(serviceUri) as SessionServiceClient
   rootStore = new RootStoreModel(api)
   try {
     data = (await storage.load(ROOT_STATE_STORAGE_KEY)) || {}