-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
documentationImprovements or additions to public interface documentation (API reference or readme).Improvements or additions to public interface documentation (API reference or readme).
Description
Using the JS Realtime SDK v2.3.0, it seems that the callback function is never executed; the Documentation indicates that it should be called on both success and failure.
Steps to Reproduce:
Given an existing channel which has already been subscribed to, this snippet establishes presence but does not generate console output when it should:
channel.presence.enter({}, function(err){ console.log(🎉); });
Changing the data payload to an invalid data type to force an error causes a Error: Data type is unsupported exception instead of executing the callback function, as in:
channel.presence.enter(0, function(err){ console.log(err); });
Workaround:
Chaining a promise works as expected, as in:
channel.presence.enter().then(
function() { console.log('🎉'); },
function(err) { console.log(err); }
);
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to public interface documentation (API reference or readme).Improvements or additions to public interface documentation (API reference or readme).