Checking commit response for result.result instead of errorCode

This commit is contained in:
Jonathan Putney
2020-08-19 09:27:17 -04:00
parent 7f1d9953e4
commit 54005312fd
6 changed files with 20 additions and 19 deletions
+2 -2
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
+1 -1
View File
File diff suppressed because one or more lines are too long
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "scorm-again",
"version": "1.4.1",
"version": "1.4.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1563,9 +1563,9 @@
"dev": true
},
"@types/mocha": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.2.tgz",
"integrity": "sha512-5cv8rmqT3KX9XtWDvSgGYfS4OwrKM2eei90GWLnTYz+AXRiBv5uYcKBjnkQ4katNvfYk3+o2bHGZUsDhdcoUyg==",
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.3.tgz",
"integrity": "sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg==",
"dev": true
},
"JSONStream": {
@@ -1632,9 +1632,9 @@
}
},
"ajv": {
"version": "6.12.3",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
"integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
"version": "6.12.4",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -3220,9 +3220,9 @@
"dev": true
},
"eslint": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.6.0.tgz",
"integrity": "sha512-QlAManNtqr7sozWm5TF4wIH9gmUm2hE3vNRUvyoYAa4y1l5/jxD/PQStEjBMQtCqZmSep8UxrcecI60hOpe61w==",
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz",
"integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "scorm-again",
"version": "1.4.2",
"version": "1.4.3",
"description": "A modern SCORM JavaScript run-time library for AICC, SCORM 1.2, and SCORM 2004",
"main": "dist/scorm-again.min.js",
"directories": {
@@ -17,14 +17,15 @@
"@babel/preset-flow": "^7.10.4",
"@babel/register": "^7.10.5",
"@types/chai": "^4.2.12",
"@types/mocha": "^8.0.2",
"@types/mocha": "^8.0.3",
"babel-eslint": "^11.0.0-beta.2",
"babelify": "^10.0.0",
"browserify": "^16.5.2",
"chai": "^4.2.0",
"eslint": "^7.6.0",
"eslint": "^7.7.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.22.0",
"fetch-pretender": "^1.5.0",
"grunt": "^1.2.1",
"grunt-browserify": "^5.3.0",
"grunt-cli": "^1.3.2",
@@ -39,7 +40,6 @@
"mocha-junit-reporter": "^2.0.0",
"mochawesome": "^6.1.1",
"nyc": "^15.1.0",
"fetch-pretender": "^1.5.0",
"sinon": "^9.0.3"
},
"scripts": {
+2 -1
View File
@@ -1066,7 +1066,8 @@ export default class BaseAPI {
return genericError;
}
if (result.errorCode === 0) {
if (result.result === true ||
result.result === global_constants.SCORM_TRUE) {
api.processListeners('CommitSuccess');
} else {
api.processListeners('CommitError');