Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,17 @@ export function getContentNodeDetailsAreValid(state) {
export function getContentNodeFilesAreValid(state, getters, rootState, rootGetters) {
return function(contentNodeId) {
const contentNode = state.contentNodesMap[contentNodeId];
if (
contentNode.kind === ContentKindsNames.TOPIC ||
contentNode.kind === ContentKindsNames.EXERCISE
) {
return true;
}
if (contentNode && contentNode.kind !== ContentKindsNames.TOPIC) {
let files = rootGetters['file/getContentNodeFiles'](contentNode.id);
if (files.length) {
// Don't count errors before files have loaded
return !getNodeFilesErrors(files).length;
} else if (
contentNode.kind === ContentKindsNames.TOPIC ||
contentNode.kind === ContentKindsNames.EXERCISE
) {
return true;
} else {
return false;
}
Expand Down