Fix: notes/create hangs when rejected (#3221)

This commit is contained in:
MeiMei
2018-11-13 19:34:09 +09:00
committed by syuilo
parent adbe0fbcd1
commit 9f0b8ba2f8
3 changed files with 16 additions and 14 deletions

View File

@@ -56,7 +56,7 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
console.warn(`SLOW API CALL DETECTED: ${ep.name} (${time}ms)`);
}
} catch (e) {
if (e.name == 'INVALID_PARAM') {
if (e && e.name == 'INVALID_PARAM') {
rej({
code: e.name,
param: e.param,