Skip to content

Commit e5acedd

Browse files
authored
Prevent MutationObserver error when removedNodes is empty (#836)
* Prevent MutationObserver error when removedNodes is empty on faction page * Added contribution information
1 parent 614be1a commit e5acedd

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

extension/changelog.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
{ "message": "Change layout of preferences page on mobiles.", "contributor": "TheFoxMan" },
1111
{ "message": "Correctly list Love Juice cooldown.", "contributor": "DeKleineKobini" },
1212
{ "message": "Option to highlight items in Bazaars that have a ccost less than the vendor price.", "contributor": "TravisTheTechie" },
13-
{ "message": "Update 'Painleth Dentitht' mission hint.", "contributor": "DeKleineKobini" }
13+
{ "message": "Update 'Painleth Dentitht' mission hint.", "contributor": "DeKleineKobini" },
14+
{ "message": "Prevent error on the faction page when member list is modified", "contributor": "MOBermejo" }
1415
],
1516
"removed": []
1617
}

extension/scripts/content/factions/ttFactions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const isOwnFaction = getSearchParameters().get("step") === "your";
203203
if (records.length > 1) return;
204204

205205
for (const record of records) {
206-
if (!record.removedNodes?.[0].matches("#iconTray")) continue;
206+
if (!record.removedNodes?.[0]?.matches("#iconTray")) continue;
207207

208208
const oldIconsCount = record.removedNodes?.[0].children.length;
209209
const newIconsCount = record.addedNodes?.[0].children.length;

extension/scripts/global/team.js

+7
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ const TEAM = [
224224
torn: 3549588,
225225
color: "firebrick",
226226
},
227+
{
228+
name: "MOBermejo",
229+
title: "Developer",
230+
core: false,
231+
torn: 3385879,
232+
color: "#DAA520",
233+
}
227234
];
228235

229236
const CONTRIBUTORS = TEAM.filter(({ title, color }) => title.includes("Developer") || color).reduce(

0 commit comments

Comments
 (0)