law-common 10.45.3-beta.2 → 10.45.3-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,13 +101,11 @@ function parseEntities(json, baseEntity, entityMap) {
|
|
|
101
101
|
if (!(baseEntity in exports.entityEnumToEntityModel)) {
|
|
102
102
|
throw new Error(`Unknown entity: ${baseEntity}`);
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
entityMap[baseEntity] = (entityMap[baseEntity].length > 0
|
|
104
|
+
entityMap[baseEntity] = ((entityMap[baseEntity] && entityMap[baseEntity].length > 0
|
|
106
105
|
? [...entityMap[baseEntity], ...json["baseEntities"]]
|
|
107
|
-
: []).map(
|
|
106
|
+
: json["baseEntities"]) || []).map(
|
|
108
107
|
// @ts-ignore
|
|
109
108
|
(e) => exports.entityEnumToEntityModel[baseEntity](e));
|
|
110
|
-
console.log("entityMap 2", entityMap);
|
|
111
109
|
if (json["relatedEntities"]) {
|
|
112
110
|
const relatedEntities = json["relatedEntities"];
|
|
113
111
|
for (const entityName in relatedEntities) {
|