diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m index f3242e4fa95..6ee1545d251 100644 --- a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m +++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m @@ -33,10 +33,6 @@ #import "GRXMappingWriter.h" -static id (^kIdentity)(id value) = ^id(id value) { - return value; -}; - @interface GRXForwardingWriter () @end @@ -51,7 +47,9 @@ static id (^kIdentity)(id value) = ^id(id value) { // Designated initializer - (instancetype)initWithWriter:(GRXWriter *)writer map:(id (^)(id value))map { if ((self = [super initWithWriter:writer])) { - _map = map ?: kIdentity; + _map = map ?: ^id(id value) { + return value; + }; } return self; }