Channel resumed parameter now has to be non-null #313
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is supposed to fix bug #297, the original fix was issued on #270 but I don't think the approach there was correct, so I changed a few things.
The issue was caused by this definition of Obj-C macro:
which is supposed to write JSON key only if
VALUE
parameter is notnil
. By accident, if the parameter is notnil
, but it happens to be0
or any other falsey value, the key also isn't written 😆 I've updated the base method to only check fornil
and also writefalse
values.The other error was with tenary operators and booleans. The expression:
evaluates to
nil
ifresumed
isnil
orfalse
, thereforefalse
values were never written 😄