Webpack build for branch master: fc1e78e545

This commit is contained in:
Travis CI 2017-09-10 12:25:11 +00:00
parent dace4889cf
commit e697fa68c1
2 changed files with 10 additions and 5 deletions

View file

@ -3762,7 +3762,7 @@ class DataStore extends Collection {
*/ */
resolveID(idOrInstance) { resolveID(idOrInstance) {
if (idOrInstance instanceof this.holds) return idOrInstance.id; if (idOrInstance instanceof this.holds) return idOrInstance.id;
if (typeof channel === 'string') return idOrInstance; if (typeof idOrInstance === 'string') return idOrInstance;
return null; return null;
} }
} }
@ -5505,7 +5505,7 @@ class MessageEmbed {
* @property {string} value The value of this field * @property {string} value The value of this field
* @property {boolean} inline If this field will be displayed inline * @property {boolean} inline If this field will be displayed inline
*/ */
this.fields = data.fields || []; this.fields = data.fields ? data.fields.map(Util.cloneObject) : [];
/** /**
* The thumbnail of this embed (if there is one) * The thumbnail of this embed (if there is one)
@ -5589,8 +5589,13 @@ class MessageEmbed {
* @property {Array<FileOptions|string|MessageAttachment>} files Files to attach * @property {Array<FileOptions|string|MessageAttachment>} files Files to attach
*/ */
if (data.files) { if (data.files) {
for (let file of data.files) if (file instanceof MessageAttachment) file = file.file; this.files = data.files.map(file => {
} else { data.files = null; } if (file instanceof MessageAttachment) {
return typeof file.file === 'string' ? file.file : Util.cloneObject(file.file);
}
return file;
});
}
} }
/** /**

File diff suppressed because one or more lines are too long