mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix setting load
This commit is contained in:
1 parent
2d5eef8d08
commit
0f23611853
4 files changed
+15
-4
No files matched your search
@@ -16,7 +16,6 @@ export default function reducer(state = {
|
||||
return {
|
||||
...state,
|
||||
output: (rdoc.stdout || '') + (rdoc.stderr || ''),
|
||||
rid: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,19 @@ export default function reducer(state = {
|
||||
}
|
||||
case 'SCRATCHPAD_RECORDS_PUSH': {
|
||||
const { rdoc } = action.payload;
|
||||
const rows = [...state.rows];
|
||||
if (!rows.includes(rdoc._id)) {
|
||||
return {
|
||||
...state,
|
||||
rows: [rdoc._id, ...state.rows],
|
||||
items: {
|
||||
...state.items,
|
||||
[rdoc._id]: rdoc,
|
||||
},
|
||||
};
|
||||
}
|
||||
return {
|
||||
...state,
|
||||
rows: [rdoc._id, ...state.rows],
|
||||
items: {
|
||||
...state.items,
|
||||
[rdoc._id]: rdoc,
|
||||
|
||||
Reference in new issue
Block a user