Skip to content

Commit

Permalink
return early from setValue if there's an error (so that it won't trig…
Browse files Browse the repository at this point in the history
…ger a commitOnAnyChange commit)
  • Loading branch information
moloko committed Oct 16, 2020
1 parent 9804c8b commit 617572a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/scorm/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,11 @@ define([
errorInfo: this.scorm.debug.getInfo(errorCode),
diagnosticInfo: this.scorm.debug.getDiagnosticInfo(errorCode)
}));
} else {
this.logger.warn(`ScormWrapper::setValue: LMS reported that the 'set' call failed but then said there was no error!`);
return success;
}
this.logger.warn(`ScormWrapper::setValue: LMS reported that the 'set' call failed but then said there was no error!`);
}


if (this.commitOnAnyChange) this.debouncedCommit();

return success;
Expand Down

0 comments on commit 617572a

Please sign in to comment.