Update api.ts

This commit is contained in:
syuilo 2018-01-19 09:22:30 +09:00 committed by GitHub
parent 6b9f6c6e3b
commit d8f8730a74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ export default (i, endpoint, data = {}): Promise<{ [x: string]: any }> => {
} else {
res.json().then(err => {
reject(err.error);
});
}, reject);
}
}).catch(reject);
});