Finalizing changes to initial data load

This commit is contained in:
Jonathan Putney
2020-07-30 18:05:11 -04:00
parent c341d3f70f
commit 22408c2c0e
6 changed files with 11 additions and 9 deletions
+3 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "scorm-again", "name": "scorm-again",
"version": "1.3.3", "version": "1.3.4",
"description": "A modern SCORM JavaScript run-time library for AICC, SCORM 1.2, and SCORM 2004", "description": "A modern SCORM JavaScript run-time library for AICC, SCORM 1.2, and SCORM 2004",
"main": "dist/scorm-again.min.js", "main": "dist/scorm-again.min.js",
"directories": { "directories": {
+2 -1
View File
@@ -550,7 +550,8 @@ export default class BaseAPI {
} else if (!this._checkObjectHasProperty(refObject, attribute)) { } else if (!this._checkObjectHasProperty(refObject, attribute)) {
this.throwSCORMError(invalidErrorCode, invalidErrorMessage); this.throwSCORMError(invalidErrorCode, invalidErrorMessage);
} else { } else {
if (this.stringMatches(CMIElement, '\\.correct_responses\\.\\d+')) { if (this.isInitialized() &&
this.stringMatches(CMIElement, '\\.correct_responses\\.\\d+')) {
this.validateCorrectResponse(CMIElement, value); this.validateCorrectResponse(CMIElement, value);
} }
+2 -1
View File
@@ -395,7 +395,8 @@ export class CMI extends BaseCMI {
* @param {string} session_time * @param {string} session_time
*/ */
set session_time(session_time) { set session_time(session_time) {
if (check2004ValidFormat(session_time, scorm2004_regex.CMITimespan)) { if (this.initialized &&
check2004ValidFormat(session_time, scorm2004_regex.CMITimespan)) {
this.#session_time = session_time; this.#session_time = session_time;
} }
} }