mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-04-21 01:56:24 +08:00
remove unneeded weakness
This commit is contained in:
parent
7f3a0a5483
commit
63ac782b32
@ -109,14 +109,12 @@ static NSString* toBase64(NSData* data) {
|
|||||||
- (NSURL*) urlTransformer:(NSURL*)url
|
- (NSURL*) urlTransformer:(NSURL*)url
|
||||||
{
|
{
|
||||||
NSURL* urlToTransform = url;
|
NSURL* urlToTransform = url;
|
||||||
__weak CDVCamera* weakSelf = self;
|
|
||||||
|
|
||||||
// for backwards compatibility - we check if this property is there
|
// for backwards compatibility - we check if this property is there
|
||||||
SEL sel = NSSelectorFromString(@"urlTransformer");
|
SEL sel = NSSelectorFromString(@"urlTransformer");
|
||||||
if ([self.commandDelegate respondsToSelector:sel]) {
|
if ([self.commandDelegate respondsToSelector:sel]) {
|
||||||
|
|
||||||
// grab the block from the commandDelegate
|
// grab the block from the commandDelegate
|
||||||
NSURL* (^urlTransformer)(NSURL*) = ((id(*)(id, SEL))objc_msgSend)(weakSelf.commandDelegate, sel);
|
NSURL* (^urlTransformer)(NSURL*) = ((id(*)(id, SEL))objc_msgSend)(self.commandDelegate, sel);
|
||||||
// if block is not null, we call it
|
// if block is not null, we call it
|
||||||
if (urlTransformer) {
|
if (urlTransformer) {
|
||||||
urlToTransform = urlTransformer(url);
|
urlToTransform = urlTransformer(url);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user