diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-04-09 12:59:47 +0300 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-08-03 10:04:57 +0300 |
commit | 5cda71737127d51517c06debb73af902119381fa (patch) | |
tree | 949549a996896da2b025d983a71884ad6b54f09d /src/errors/match.js | |
parent | c49f2f5c006c6b98b6a7227fe4d76f577a974735 (diff) |
Migrate to eslint-config-nextcloud
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/errors/match.js')
-rw-r--r-- | src/errors/match.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/errors/match.js b/src/errors/match.js index 6167a3d8e..6e9ff3e8c 100644 --- a/src/errors/match.js +++ b/src/errors/match.js @@ -1,4 +1,4 @@ -/* +/** * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author 2020 Christoph Wurst <christoph@winzerhof-wurst.at> @@ -20,15 +20,15 @@ */ /** - * @param {Error} error - * @param {object} matches + * @param {Error} error error + * @param {object} matches matches */ -export const matchError = async (error, matches) => { +export const matchError = async(error, matches) => { if (error.name in matches) { return await Promise.resolve(matches[error.name](error)) } if ('default' in matches) { - return await Promise.resolve(matches['default'](error)) + return await Promise.resolve(matches.default(error)) } throw new Error('unhandled error in match: ' + error.name) } |