From 10b38185c4672381c6e322045b1190b00729bb25 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sun, 26 Jun 2022 13:25:11 +1200 Subject: [PATCH] Correctly show co-authored videos --- src/lib/structures/TimelineEntry.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/structures/TimelineEntry.js b/src/lib/structures/TimelineEntry.js index 97c64c1..55f644f 100644 --- a/src/lib/structures/TimelineEntry.js +++ b/src/lib/structures/TimelineEntry.js @@ -85,6 +85,10 @@ class TimelineEntry extends TimelineBaseMethods { * @param {import("../types").TimelineEntryN3} data */ applyN3(data) { + // don't apply null fields from the update over real data. this didn't used to happen, but it can happen now with a co-authored post since those have an incomplete author (triggering the update) and are no longer fetched from real N3 + for (const key of Object.keys(data)) { + if (this.data[key] != null && data[key] == null) delete data[key] + } Object.assign(this.data, data) this.fixData() }