We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2202d94 commit a857973Copy full SHA for a857973
packages/controller/src/main.ts
@@ -1846,6 +1846,10 @@ async function sendTo(
1846
message: ioBroker.MessagePayload,
1847
callback?: ioBroker.ErrorCallback | ioBroker.MessageCallbackInfo
1848
): Promise<void> {
1849
+ if (!states) {
1850
+ return;
1851
+ }
1852
+
1853
if (message === undefined) {
1854
message = command;
1855
command = 'send';
@@ -1876,7 +1880,7 @@ async function sendTo(
1876
1880
}
1877
1881
1878
1882
try {
1879
- await states!.pushMessage(objName, obj);
1883
+ await states.pushMessage(objName, obj);
1884
} catch (e) {
1885
// do not stringify the object, we had the issue with the invalid string length on serialization
1886
logger.error(
0 commit comments