Blank string is valid for cmi.core.exit/cmi.exit

This commit is contained in:
Jonathan Putney
2019-12-30 13:19:06 -05:00
parent 6445904432
commit f2637f10b5
3 changed files with 4 additions and 2 deletions

View File

@@ -462,7 +462,7 @@ class CMICore extends BaseCMI {
* @param {string} exit
*/
set exit(exit) {
if (check12ValidFormat(exit, regex.CMIExit)) {
if (check12ValidFormat(exit, regex.CMIExit, true)) {
this.#exit = exit;
}
}

View File

@@ -235,7 +235,7 @@ export class CMI extends BaseCMI {
* @param {string} exit
*/
set exit(exit) {
if (check2004ValidFormat(exit, regex.CMIExit)) {
if (check2004ValidFormat(exit, regex.CMIExit, true)) {
this.#exit = exit;
}
}

View File

@@ -89,6 +89,7 @@ export const scorm12_values = {
'time-out',
'suspend',
'logout',
'',
],
invalidExit: [
'close',
@@ -229,6 +230,7 @@ export const scorm2004_values = {
'suspend',
'logout',
'normal',
'',
],
invalidExit: [
'close',