diff --git a/SocketIO.m b/SocketIO.m index 61ff67a..25329f1 100755 --- a/SocketIO.m +++ b/SocketIO.m @@ -237,7 +237,10 @@ - (void) sendEvent:(NSString *)eventName withData:(id)data andAcknowledge:(Socke // do not require arguments if (data != nil) { - [dict setObject:[NSArray arrayWithObject:data] forKey:@"args"]; + if (![data isKindOfClass:[NSArray class]]) { + data = [NSArray arrayWithObject:data]; + } + [dict setObject:data forKey:@"args"]; } SocketIOPacket *packet = [[SocketIOPacket alloc] initWithType:@"event"];