diff options
Diffstat (limited to 'public/face.js')
-rw-r--r-- | public/face.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/public/face.js b/public/face.js index 1e8e2ad..0caff8c 100644 --- a/public/face.js +++ b/public/face.js @@ -238,13 +238,9 @@ jQuery(function($) { }); // fetch current price as percent and populate #rate - $.ajax({ - method: 'GET', - url: DATA_URL, - dataType: 'json', - }).fail(function(r) { - alert("Couldn't fetch current data."); - }).done(function(r) { + fetch(DATA_URL).then(function(r) { + return r.json(); + }).then(function(r) { // cache current price CURRENT = to_percent(r.ask); |