diff --git a/ios/Capacitor/Capacitor/CAPPlugin.m b/ios/Capacitor/Capacitor/CAPPlugin.m index e3e1d202b3..5ec22f618b 100644 --- a/ios/Capacitor/Capacitor/CAPPlugin.m +++ b/ios/Capacitor/Capacitor/CAPPlugin.m @@ -93,7 +93,7 @@ - (void)notifyListeners:(NSString *)eventName data:(NSDictionary - (void)notifyListeners:(NSString *)eventName data:(NSDictionary *)data retainUntilConsumed:(BOOL)retain { NSArray *listenersForEvent = [self.eventListeners objectForKey:eventName]; - if(listenersForEvent == nil) { + if(listenersForEvent == nil || [listenersForEvent count] == 0) { if (retain == YES) { [self.retainedEventArguments setObject:data forKey:eventName]; }