Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Commit 7b2b13b

Browse files
author
Tony Lownds
committed
Fix bug with multiple devices returning the same information
1 parent 3ff0561 commit 7b2b13b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ios/RNGoogleCast/RNGoogleCast.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ - (NSDictionary *)constantsToExport
151151
reject:(RCTPromiseRejectBlock)reject)
152152
{
153153
NSMutableArray *devicesList = [[NSMutableArray alloc] init];
154-
NSMutableDictionary *singleDevice= [[NSMutableDictionary alloc] init];
154+
NSMutableDictionary *singleDevice;
155155
for (NSString *key in [self.currentDevices allKeys]) {
156156
GCKDevice *device = self.currentDevices[key];
157+
singleDevice = [[NSMutableDictionary alloc] init];
157158
singleDevice[@"id"] = key;
158159
singleDevice[@"name"] = device.friendlyName;
159160
[devicesList addObject:singleDevice];

0 commit comments

Comments
 (0)