@almadar/runtime 4.13.1 → 4.13.3
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.
|
@@ -1112,6 +1112,14 @@ var OrbitalServerRuntime = class {
|
|
|
1112
1112
|
if (stored) {
|
|
1113
1113
|
entityData = stored;
|
|
1114
1114
|
}
|
|
1115
|
+
} else if (registered.entity?.name) {
|
|
1116
|
+
try {
|
|
1117
|
+
const all = await this.persistence.list(registered.entity.name);
|
|
1118
|
+
if (Array.isArray(all) && all.length > 0 && all[0]) {
|
|
1119
|
+
entityData = all[0];
|
|
1120
|
+
}
|
|
1121
|
+
} catch {
|
|
1122
|
+
}
|
|
1115
1123
|
}
|
|
1116
1124
|
const results = registered.manager.sendEvent(event, cleanPayload, entityData);
|
|
1117
1125
|
const filteredResults = activeTraits && activeTraits.length > 0 ? results.filter(({ traitName }) => activeTraits.includes(traitName)) : results;
|