var url = constructSearchUrl();
fetch(url, {method:'GET', cache:'default'})
- .then(response => response.json())
- .then((jsonValue) => {
+ .then(function(response) {return response.json();})
+ .then(function(jsonValue) {
// console.log('JSON response: ', jsonValue);
booksModel.ids = jsonValue;
booksModel.count = booksModel.ids.length;
PagingController.adjustPos(0);
})
- .catch(err => {
+ .catch(function(err) {
var msg = 'Error fetching JSON from URL: ' + url + ': ' + err + ':' + err.stack;
console.log(msg);
report(msg);