Skip to content

Commit 2e0b4dd

Browse files
Updated the .blocks request so it doesn't ask for a delta, also fixed a bug when no root block is selected.
1 parent ad825f3 commit 2e0b4dd

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

src/malcolm/malcolmActionCreators.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export const malcolmGetAction = path => ({
2323
},
2424
});
2525

26-
export const malcolmSubscribeAction = path => ({
26+
export const malcolmSubscribeAction = (path, delta = true) => ({
2727
type: MalcolmSend,
2828
payload: {
2929
typeid: 'malcolm:core/Subscribe:1.0',
3030
path,
31-
delta: true,
31+
delta,
3232
},
3333
});
3434

src/malcolm/middleware/malcolmRouting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const handleLocationChange = (path, blocks, dispatch) => {
1616

1717
// Get the root list of blocks
1818
dispatch(malcolmNewBlockAction('.blocks', false, false));
19-
dispatch(malcolmSubscribeAction(['.', 'blocks']));
19+
dispatch(malcolmSubscribeAction(['.', 'blocks'], false));
2020

2121
for (let i = 0; i < tokens.length; i += 1) {
2222
if (i % 2 === 0) {

src/malcolm/reducer/navigation.reducer.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ export const processNavigationLists = (paths, blocks) => {
66
label: p,
77
}));
88

9-
if (navigationLists.length === 0) {
10-
navigationLists.push({
11-
path: '',
12-
children: [],
13-
basePath: '/',
14-
label: '',
15-
});
16-
}
17-
189
const rootNav = {
1910
path: '',
2011
children: [],

0 commit comments

Comments
 (0)