Skip to content

Commit

Permalink
merge dicts to collect nested additionalKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
quantenschaum committed Jul 7, 2024
1 parent 2bcfc1e commit 0d92110
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions viewer/nav/gpsdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const specialHandling=[
*/
const GpsData=function(){


this.timer=null;

this.gpsErrors=0;
Expand Down Expand Up @@ -156,7 +156,12 @@ GpsData.prototype.handleGpsResponse=function(data, status){
for (let k in data){
if (ignoredKeys.indexOf(k)>=0) continue;
if (this.filteredStoreKeys[k]) continue; //ignore any key we use internally
this.additionalKeys[k]=this.computeKeys(k,data[k],base);
let keys=this.computeKeys(k,data[k],base);
if(typeof(keys)=="object" && typeof(this.additionalKeys[k])=="object"){
keys = assign(this.additionalKeys[k],keys);
}else{
this.additionalKeys[k]=keys;
}
gpsdata[k]=data[k];
}
this.writeToStore(gpsdata,this.additionalKeys);
Expand Down

0 comments on commit 0d92110

Please sign in to comment.