diff --git a/RNGL/GLCanvas.m b/RNGL/GLCanvas.m index db240c925f47c3d08bbbdd1b068222c975b0555e..4c2a6ab712d6e84ea98eeda330a8c6ecb7829386 100644 --- a/RNGL/GLCanvas.m +++ b/RNGL/GLCanvas.m @@ -418,22 +418,18 @@ RCT_NOT_IMPLEMENTED(-init) - (void)dispatchOnLoad { - if (_onLoad) { - [_bridge.eventDispatcher sendInputEventWithName:@"load" body:@{ @"target": self.reactTag }]; - } + [_bridge.eventDispatcher sendInputEventWithName:@"load" body:@{ @"target": self.reactTag }]; } - (void)dispatchOnProgress: (double)progress withLoaded:(int)loaded withTotal:(int)total { - if (_onProgress) { - NSDictionary *event = - @{ - @"target": self.reactTag, - @"progress": @(progress), - @"loaded": @(loaded), - @"total": @(total) }; - [_bridge.eventDispatcher sendInputEventWithName:@"progress" body:event]; - } + NSDictionary *event = + @{ + @"target": self.reactTag, + @"progress": @(progress), + @"loaded": @(loaded), + @"total": @(total) }; + [_bridge.eventDispatcher sendInputEventWithName:@"progress" body:event]; } -@end \ No newline at end of file +@end