Skip to content

Commit

Permalink
fix #91: custom setting link
Browse files Browse the repository at this point in the history
  • Loading branch information
dufoli committed May 13, 2024
1 parent c70632e commit 86539a3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions addon/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ class AllDataBox extends React.PureComponent {
loadSobjects() {
let entityMap = new Map();

function addEntity({name, label, keyPrefix, durableId, isCustomSetting, recordTypesSupported, isEverCreatable, newUrl}, api) {
function addEntity(sobj, api) {
let {name, label, keyPrefix, durableId, isCustomSetting, recordTypesSupported, isEverCreatable, newUrl, createable, customSetting} = sobj;
label = label || ""; // Avoid null exceptions if the object does not have a label (some don't). All objects have a name. Not needed for keyPrefix since we only do equality comparisons on those.
let entity = entityMap.get(name);
if (entity) {
Expand All @@ -565,15 +566,18 @@ class AllDataBox extends React.PureComponent {
if (!entity.durableId) {
entity.durableId = durableId;
}
if (!entity.isEverCreatable) {
entity.isEverCreatable = isEverCreatable;
if (entity.isEverCreatable == undefined) {
entity.isEverCreatable = isEverCreatable || createable;
}
if (!entity.newUrl) {
entity.newUrl = newUrl;
}
if (!entity.recordTypesSupported) {
if (entity.recordTypesSupported == undefined) {
entity.recordTypesSupported = recordTypesSupported;
}
if (entity.isCustomSetting == undefined) {
entity.isCustomSetting = isCustomSetting || customSetting;
}
} else {
entity = {
availableApis: [],
Expand Down

0 comments on commit 86539a3

Please sign in to comment.