Puck disconnecting after running function from the browser without passing a callback. #1736
Replies: 7 comments
-
Posted at 2016-12-14 by @gfwilliams Could you check on the Web Browser's debug console and see if it really is just complaining about trying to call a callback that doesn't exist? It wouldn't surprise me, and it's an easy fix - the standard |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by alexjfno1 Hi Gordon, I found the issue in the https://www.puck-js.com/puck.js code I believe. I've made some comments below.
Like you said it's an easy fix to only call the callback if one is passed. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by alexjfno1 I've also noticed that the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by @gfwilliams Just updated! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by alexjfno1 Great! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-15 by alexjfno1 @gfwilliams is there a reason why the
When I run this I get |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-15 by @gfwilliams It's that Puck.connect is the more 'advanced' way to talk to the Pucks - I'd been assuming that you would want full control of the input and output if you used it. As a result, it's a bit harder to give you full control of the IO and then to yank it back when If you want to add some extra stuff to it, pull requests are welcome :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-12-13 by alexjfno1
Hi,
Been playing around with the Web Javascript API and have noticed that if you don't specify a callback on some functions the Puck will disconnect instantly. For example:
Here is what I want to do
Expect when I call the
resetLEDOnButtonClick
a while later the Puck has been disconnected.I've ended up having to pass empty callbacks everywhere just to stop it disconnecting. For example:
Is this expected or am I using the API wrong?
Beta Was this translation helpful? Give feedback.
All reactions