From a74e95ed161f0c03f1e40dde0dd5789cb553fea8 Mon Sep 17 00:00:00 2001 From: Snowflake107 Date: Tue, 15 Jun 2021 15:58:09 +0545 Subject: [PATCH] raw getter to value --- src/Structures/Track.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structures/Track.ts b/src/Structures/Track.ts index 907b169..6bcaab0 100644 --- a/src/Structures/Track.ts +++ b/src/Structures/Track.ts @@ -15,7 +15,7 @@ class Track { public views!: number; public requestedBy!: User; public playlist?: Playlist; - public readonly raw!: RawTrackData; + public readonly raw: RawTrackData = {} as RawTrackData; public readonly _trackID = Date.now(); /** @@ -106,7 +106,7 @@ class Track { this.playlist = data.playlist; // raw - Object.defineProperty(this, "raw", { get: () => Object.assign({}, { source: data.raw?.source ?? data.source }, data.raw ?? data), enumerable: false }); + Object.defineProperty(this, "raw", { value: Object.assign({}, { source: data.raw?.source ?? data.source }, data.raw ?? data), enumerable: false }); } /**