Skip to content

Commit da9fb15

Browse files
committed
fix reload editor-actions on re-open
1 parent 32de1c2 commit da9fb15

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

lib/reducers/editor-actions/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ function editorActionsReducer(editorActions, action) {
1616
var actions = null;
1717
switch (action.type) {
1818
case _types_1.TESTS_LOAD:
19+
if (store_1.default.getState().progress.pages[store_1.default.getState().pagePosition]) {
20+
return [];
21+
}
1922
taskTracker = 0;
2023
actions = store_1.default.getState().tasks.map(function (task) { return task.actions || []; });
2124
handleEditorActions(actions);

src/reducers/editor-actions/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export default function editorActionsReducer(
2222
switch (action.type) {
2323

2424
case TESTS_LOAD:
25+
26+
if (store.getState().progress.pages[store.getState().pagePosition]) {
27+
return [];
28+
}
2529
taskTracker = 0;
2630
actions = store.getState().tasks.map(task => task.actions || []);
2731
handleEditorActions(actions); // run first action

tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,13 @@
121121
"src/components/AppMenu/CloseWindow.tsx",
122122
"src/components/AppMenu/index.tsx",
123123
"src/components/AppMenu/issuesLink.tsx",
124-
"src/components/AppMenu/MenuIconRight.tsx",
124+
"src/components/AppMenu/menuIconRight.tsx",
125125
"src/components/AppMenu/MenuLink/index.tsx",
126126
"src/components/AppMenu/menuRight.tsx",
127127
"src/components/AppMenu/menuRightRouteOptions.tsx",
128128
"src/components/AppMenu/Quit/index.tsx",
129129
"src/components/Common/RouteButton.tsx",
130130
"src/components/FinalPage/index.tsx",
131-
"src/components/Hold/index.tsx",
132131
"src/components/Markdown/index.tsx",
133132
"src/components/Page/EditPage/index.tsx",
134133
"src/components/Page/Hints/HintButton.tsx",

0 commit comments

Comments
 (0)