Commit a8384035 authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

fix infinite recursion bug with local image

parent 2495cadc
...@@ -79,8 +79,9 @@ RCT_NOT_IMPLEMENTED(-init) ...@@ -79,8 +79,9 @@ RCT_NOT_IMPLEMENTED(-init)
// Load the image (without resizing it) // Load the image (without resizing it)
if (![_src hasPrefix:@"http://"] && ![_src hasPrefix:@"https://"]) { if (![_src hasPrefix:@"http://"] && ![_src hasPrefix:@"https://"]) {
// N.B: in this case we don't trigger onload because image is already loaded.
// this behavior is specific to GLCanvas needs
self.image = [UIImage imageNamed:_src]; self.image = [UIImage imageNamed:_src];
if(_onload) _onload();
} else { } else {
_loading = [_bridge.imageLoader loadImageWithTag:_src _loading = [_bridge.imageLoader loadImageWithTag:_src
size:CGSizeZero size:CGSizeZero
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment