Skip to content

Commit

Permalink
ensure that this._shouldStoreResponses and (#209)
Browse files Browse the repository at this point in the history
... this._shouldStoreAttempts don't get set to undefined if the settings are missing from config.json
fixes adaptlearning/adapt_framework#2994
  • Loading branch information
moloko authored Dec 14, 2020
1 parent baf33d7 commit 07b7b45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/adapt-stateful-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ define([
const config = Adapt.spoor.config;
if (!config) return;
const tracking = config._tracking;
this._shouldStoreResponses = (tracking && tracking._shouldStoreResponses);
this._shouldStoreAttempts = (tracking && tracking._shouldStoreAttempts);
this._shouldStoreResponses = (tracking && tracking._shouldStoreResponses) || false;
this._shouldStoreAttempts = (tracking && tracking._shouldStoreAttempts) || false;
// Default should be to record interactions, so only avoid doing that if
// _shouldRecordInteractions is set to false
if (tracking && tracking._shouldRecordInteractions === false) {
Expand Down

0 comments on commit 07b7b45

Please sign in to comment.