diff options
Diffstat (limited to 'recipes/grape')
-rw-r--r-- | recipes/grape/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/recipes/grape/index.js b/recipes/grape/index.js index 356b57a..2039c8d 100644 --- a/recipes/grape/index.js +++ b/recipes/grape/index.js | |||
@@ -1,4 +1,4 @@ | |||
1 | function _asyncToGenerator(fn) { return function () { const gen = fn.apply(this, arguments); return new Promise((resolve, reject) => { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then((value) => { step('next', value); }, (err) => { step('throw', err); }); } } return step('next'); }); }; } | 1 | function _asyncToGenerator(fn) { return function () { const gen = Reflect.apply(fn, this, arguments); return new Promise((resolve, reject) => { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then((value) => { step('next', value); }, (error) => { step('throw', error); }); } } return step('next'); }); }; } |
2 | 2 | ||
3 | module.exports = Ferdi => class Grape extends Ferdi { | 3 | module.exports = Ferdi => class Grape extends Ferdi { |
4 | validateUrl(url) { | 4 | validateUrl(url) { |
@@ -8,8 +8,8 @@ module.exports = Ferdi => class Grape extends Ferdi { | |||
8 | method: 'GET', | 8 | method: 'GET', |
9 | }); | 9 | }); |
10 | return resp.status === 200; | 10 | return resp.status === 200; |
11 | } catch (err) { | 11 | } catch (error) { |
12 | console.error(err); | 12 | console.error(error); |
13 | } | 13 | } |
14 | 14 | ||
15 | return false; | 15 | return false; |