diff --git a/src/BaseAPI.js b/src/BaseAPI.js index 4c44b9f..97c7fc3 100644 --- a/src/BaseAPI.js +++ b/src/BaseAPI.js @@ -810,9 +810,10 @@ export default class BaseAPI { this.startingData = json; + // could this be refactored down to flatten(json) then setCMIValue on each? for (const key in json) { if ({}.hasOwnProperty.call(json, key) && json[key]) { - const currentCMIElement = CMIElement + '.' + key; + const currentCMIElement = (CMIElement ? CMIElement + '.' : '') + key; const value = json[key]; if (value['childArray']) {