fix(Attachment): do not destructure data (#8041)

This commit is contained in:
Synbulat Biishev
2022-06-08 16:30:06 +05:00
committed by GitHub
parent 65cb36166f
commit 1afae909d7

View File

@@ -13,14 +13,14 @@ const Util = require('../util/Util');
* Represents an attachment
*/
class Attachment {
constructor({ url, filename, ...data }) {
this.attachment = url;
constructor(data) {
this.attachment = data.url;
/**
* The name of this attachment
* @type {string}
*/
this.name = filename;
if (data) this._patch(data);
this.name = data.filename;
this._patch(data);
}
_patch(data) {