Stop doubling the message key

This commit is contained in:
iCrawl
2017-07-31 01:32:44 +02:00
parent bdc61a4068
commit 8a9b6cbdb5

View File

@@ -27,6 +27,7 @@ class DiscordAPIError extends Error {
let messages = [];
for (const k of Object.keys(obj)) {
if (k === 'message') continue;
const newKey = key ? isNaN(k) ? `${key}.${k}` : `${key}[${k}]` : k;
if (obj[k]._errors) {