Skip to content

Commit 69ce0b2

Browse files
authored
chore(compass-indexes): use initial state, not state setting actions in activate COMPASS-8245 (#6201)
use initial state, not state setting actions in activate
1 parent 6c89281 commit 69ce0b2

File tree

1 file changed

+2
-4
lines changed
  • packages/compass-indexes/src/stores

1 file changed

+2
-4
lines changed

packages/compass-indexes/src/stores/store.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export function activateIndexesPlugin(
7777
const store: IndexesStore = createStore(
7878
reducer,
7979
{
80+
isWritable: instance.isWritable,
81+
description: instance.description,
8082
namespace: options.namespace,
8183
serverVersion: options.serverVersion,
8284
isReadonlyView: options.isReadonly,
@@ -138,10 +140,6 @@ export function activateIndexesPlugin(
138140
void store.dispatch(refreshSearchIndexes());
139141
});
140142

141-
// set the initial values
142-
store.dispatch(writeStateChanged(instance.isWritable));
143-
store.dispatch(getDescription(instance.description));
144-
145143
// these can change later
146144
on(instance, 'change:isWritable', () => {
147145
store.dispatch(writeStateChanged(instance.isWritable));

0 commit comments

Comments
 (0)