}
fetch(url, {method:'GET', cache:'default'})
- .then(response => response.json())
- .then((jsonValue) => {
- console.log('JSON response for info: ', jsonValue);
+ .then(function(response) {return response.json();})
+ .then(function(jsonValue) {
my.cache = jsonValue;
notifyAll(); // inform all subscribers that the model has been updated
})
- .catch(err => {
+ .catch(function(err) {
var msg = 'Error fetching book details via URL: ' + url + ': ' + err;
console.log(msg, err.stack);
report(msg);