MOBILE-3040 submission: Fix isSubmissionEmpty logic
parent
c0e8b8d006
commit
5690fafe20
|
@ -193,7 +193,15 @@ export class AddonModAssignHelperProvider {
|
|||
return true;
|
||||
}
|
||||
|
||||
return !!submission.plugins.find((plugin) => this.submissionDelegate.isPluginEmpty(assign, plugin));
|
||||
for (const plugin of submission.plugins) {
|
||||
// If any plugin is not empty, we consider that the submission is not empty either.
|
||||
if (!this.submissionDelegate.isPluginEmpty(assign, plugin)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If all the plugins were empty (or there were no plugins), we consider the submission to be empty.
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue