@kronos-integration/service 11.2.1 → 11.2.2
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.
- package/package.json +1 -1
- package/src/endpoints-mixin.mjs +12 -12
package/package.json
CHANGED
package/src/endpoints-mixin.mjs
CHANGED
|
@@ -54,15 +54,17 @@ export function EndpointsMixin(superclass) {
|
|
|
54
54
|
const receive = definition.receive;
|
|
55
55
|
|
|
56
56
|
if (typeof receive === "string") {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
switch(typeof this[receive]) {
|
|
58
|
+
case "function":
|
|
59
|
+
definition.receive = (...args) => this[receive](...args);
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
definition.receive = () => this[receive];
|
|
63
|
+
break;
|
|
64
|
+
case "undefined":
|
|
65
|
+
throw new Error(
|
|
66
|
+
`No sucht method or property ${this.name}.${receive}`
|
|
67
|
+
);
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
}
|
|
@@ -193,9 +195,7 @@ export function EndpointsMixin(superclass) {
|
|
|
193
195
|
const serviceProvider = this.owner;
|
|
194
196
|
const service = serviceName.length === 0 ? serviceProvider : serviceProvider.getService(serviceName);
|
|
195
197
|
|
|
196
|
-
return service
|
|
197
|
-
? service.endpointForExpression(suffixExpression)
|
|
198
|
-
: undefined;
|
|
198
|
+
return service?.endpointForExpression(suffixExpression);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
if (from !== undefined) {
|