refactor: update ikonis features injection to use array-based storage instead of object assignment
This commit is contained in:
parent
d7fd36d24e
commit
689a9ec2ff
1 changed files with 5 additions and 5 deletions
|
|
@ -204,18 +204,18 @@ export function patchDhCharacter(DhCharacter) {
|
|||
const originalSheetLists = descriptor.get;
|
||||
Object.defineProperty(DhCharacter.prototype, 'sheetLists', {
|
||||
get: function() {
|
||||
const lists = originalSheetLists.call(this);
|
||||
if (!this.parent) return lists;
|
||||
const lists = originalSheetLists.call(this); // This is an Array
|
||||
if (!this.parent || !Array.isArray(lists)) return lists;
|
||||
|
||||
const ikonisFeatures = _injectIkonisFeatures(this.parent);
|
||||
|
||||
if (ikonisFeatures.length > 0) {
|
||||
if (!lists.features) lists.features = {};
|
||||
lists.features["Ikonis Augments"] = {
|
||||
// Add our custom category to the end of the lists array
|
||||
lists.push({
|
||||
title: "Ikonis Augments",
|
||||
type: "ikonis",
|
||||
values: ikonisFeatures
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
return lists;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue