X-Git-Url: http://jaekl.net/gitweb/?p=quanweb.git;a=blobdiff_plain;f=js%2FSearchController.js;h=b95c951b3c09250fc0f0d2b23d0d9705385b13e8;hp=5b770b59673661d11a4cb0e9cb872e8595622dbb;hb=e2b95cefd1e34e652317fdf82595932c0bf0c6bb;hpb=32c817b6cf7484487c1160cec8a4b9e770b8404a diff --git a/js/SearchController.js b/js/SearchController.js index 5b770b5..b95c951 100644 --- a/js/SearchController.js +++ b/js/SearchController.js @@ -22,8 +22,8 @@ var SearchController = (function () { 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; @@ -34,7 +34,7 @@ var SearchController = (function () { PagingController.adjustPos(0); }) - .catch(err => { + .catch(function(err) { var msg = 'Error fetching JSON from URL: ' + url + ': ' + err + ':' + err.stack; console.log(msg); report(msg);