Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-04-09 12:59:47 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-08-03 10:04:57 +0300
commit5cda71737127d51517c06debb73af902119381fa (patch)
tree949549a996896da2b025d983a71884ad6b54f09d /src/errors/match.js
parentc49f2f5c006c6b98b6a7227fe4d76f577a974735 (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.js10
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)
}