diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-10-05 17:04:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 17:04:09 +0200 |
commit | d3841b766f9d37d557646003899f67525c5f755f (patch) | |
tree | 1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/hipchat/index.js | |
parent | chore: repo maintenance (#732) (diff) | |
download | ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip |
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/hipchat/index.js')
-rw-r--r-- | recipes/hipchat/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/recipes/hipchat/index.js b/recipes/hipchat/index.js index 5c550d8..0a461ab 100644 --- a/recipes/hipchat/index.js +++ b/recipes/hipchat/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 HipChat extends Ferdi { | 3 | module.exports = Ferdi => class HipChat extends Ferdi { |
4 | validateUrl(url) { | 4 | validateUrl(url) { |
@@ -13,8 +13,8 @@ module.exports = Ferdi => class HipChat extends Ferdi { | |||
13 | const data = yield resp.json(); | 13 | const data = yield resp.json(); |
14 | 14 | ||
15 | return Object.hasOwnProperty.call(data, 'features'); | 15 | return Object.hasOwnProperty.call(data, 'features'); |
16 | } catch (err) { | 16 | } catch (error) { |
17 | console.error(err); | 17 | console.error(error); |
18 | } | 18 | } |
19 | 19 | ||
20 | return false; | 20 | return false; |