lukeredpath/libPusher — Issue #18: PTPusherEvent fails to return data if it is not in JSON format
Author: skattyadz
Created: 2012-01-17 01:50:09+00:00
State: open

When an event arrives, PTPusherEvent attempts to decode it as JSON. If the data is not JSON, it should just return the data as a string: https://github.com/lukeredpath/libPusher/blob/master/Library/PTPusherEvent.m#L34

When objectFromJSONString fails to parse the data, it returns nil. However, the check on line 30 isn't looking at _data at all, and is expecting an NSError (error), which is never created.

I was able to fix the issue by changing line 30 to `if (_data == nil)`. Is there something I am missing here, or should I submit a pull request with a fix?

Adam