mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +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,
|
||||
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