Fixing 'this' for scheduled timeout
This commit is contained in:
4
dist/scorm-again.js
vendored
4
dist/scorm-again.js
vendored
File diff suppressed because one or more lines are too long
2
dist/scorm-again.js.map
vendored
2
dist/scorm-again.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/scorm-again.min.js
vendored
2
dist/scorm-again.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -907,7 +907,7 @@ export default class BaseAPI {
|
||||
*/
|
||||
scheduleCommit(when: number) {
|
||||
this.clearScheduledCommit();
|
||||
this.#timeout = setTimeout(this.scheduledCallback, when);
|
||||
this.#timeout = setTimeout(this.scheduledCallback.bind(this), when);
|
||||
this.apiLog('scheduleCommit', '', 'scheduled', global_constants.LOG_LEVEL_DEBUG);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user