@@ -357,6 +357,11 @@ - (void)_multiGet:(NSArray<NSString *> *)keys
357
357
callback (@[RCTNullIfNil (errors), result]);
358
358
}
359
359
360
+ - (BOOL )_passthroughDelegate
361
+ {
362
+ return [self .delegate respondsToSelector: @selector (isPassthrough )] && self.delegate .isPassthrough ;
363
+ }
364
+
360
365
#pragma mark - Exported JS Functions
361
366
362
367
RCT_EXPORT_METHOD (multiGet:(NSArray <NSString *> *)keys
@@ -380,7 +385,10 @@ - (void)_multiGet:(NSArray<NSString *> *)keys
380
385
}
381
386
}];
382
387
}];
383
- return ;
388
+
389
+ if (![self _passthroughDelegate ]) {
390
+ return ;
391
+ }
384
392
}
385
393
386
394
NSDictionary *errorOut = [self _ensureSetup ];
@@ -409,7 +417,10 @@ - (void)_multiGet:(NSArray<NSString *> *)keys
409
417
NSArray <NSDictionary *> *errors = RCTMakeErrors (results);
410
418
callback (@[RCTNullIfNil (errors)]);
411
419
}];
412
- return ;
420
+
421
+ if (![self _passthroughDelegate ]) {
422
+ return ;
423
+ }
413
424
}
414
425
415
426
NSDictionary *errorOut = [self _ensureSetup ];
@@ -443,7 +454,10 @@ - (void)_multiGet:(NSArray<NSString *> *)keys
443
454
NSArray <NSDictionary *> *errors = RCTMakeErrors (results);
444
455
callback (@[RCTNullIfNil (errors)]);
445
456
}];
446
- return ;
457
+
458
+ if (![self _passthroughDelegate ]) {
459
+ return ;
460
+ }
447
461
}
448
462
449
463
NSDictionary *errorOut = [self _ensureSetup ];
@@ -487,7 +501,10 @@ - (void)_multiGet:(NSArray<NSString *> *)keys
487
501
NSArray <NSDictionary *> *errors = RCTMakeErrors (results);
488
502
callback (@[RCTNullIfNil (errors)]);
489
503
}];
490
- return ;
504
+
505
+ if (![self _passthroughDelegate ]) {
506
+ return ;
507
+ }
491
508
}
492
509
493
510
NSDictionary *errorOut = [self _ensureSetup ];
@@ -543,7 +560,10 @@ - (void)_multiGet:(NSArray<NSString *> *)keys
543
560
[self .delegate allKeys: ^(NSArray <id <NSObject >> *keys) {
544
561
callback (@[(id )kCFNull , keys]);
545
562
}];
546
- return ;
563
+
564
+ if (![self _passthroughDelegate ]) {
565
+ return ;
566
+ }
547
567
}
548
568
549
569
NSDictionary *errorOut = [self _ensureSetup ];
0 commit comments