Is the final version of DataStore.add() (p. 289) missing a line?

Shouldn’t it be:

DataStore.prototype.add = function(key, val) {
this.data[key] = val;
return promiseResolvedWith(null);
}

The code in the book implies that it only contains the second line, where it returns promiseResolvedWith(null)…but then it would not actually add the new value into DataStore’s data. You can see this by printing out
window.myTruck.db.data
in the console debugger, it remains empty.

I guess in the local data store version this is not critical, since the data is not preserved across runs, and the callback function passed to formHandler.addSubmitHandler() explicitly adds the new row to the checkList independently from calling myTruck.createOrder()…and then I guess DataStore.remove() silently ignores the fact that the delete doesn’t do anything.

Never mind, I see this was already addressed in the errata in this forum: Errata: 1st Edition