mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
fix: only pass callback in emit_update if given
This commit is contained in:
parent
5cb30688cf
commit
4ff07aa587
@ -15,5 +15,9 @@ export const emit_update = (
|
|||||||
value: unknown,
|
value: unknown,
|
||||||
callback?: (ack: unknown) => void
|
callback?: (ack: unknown) => void
|
||||||
) => {
|
) => {
|
||||||
socket.emit('frontend_update', { name, parent_path, value }, callback);
|
if (callback) {
|
||||||
|
socket.emit('frontend_update', { name, parent_path, value }, callback);
|
||||||
|
} else {
|
||||||
|
socket.emit('frontend_update', { name, parent_path, value });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user