We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 757b1b1 commit d3ff082Copy full SHA for d3ff082
src/addon/mod/assign/providers/assign.ts
@@ -379,9 +379,13 @@ export class AddonModAssignProvider {
379
*
380
* @param {any} assign Assign.
381
* @param {any} attempt Attempt.
382
- * @return {any} Submission object.
+ * @return {any} Submission object or null.
383
*/
384
getSubmissionObjectFromAttempt(assign: any, attempt: any): any {
385
+ if (!attempt) {
386
+ return null;
387
+ }
388
+
389
return assign.teamsubmission ? attempt.teamsubmission : attempt.submission;
390
}
391
0 commit comments