Repository: incubator-weex
Updated Branches:
  refs/heads/0.13-dev 89152a36e -> 2615aa529 (forced update)


* [ios] fix muted object when emeration


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/c155e368
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/c155e368
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/c155e368

Branch: refs/heads/0.13-dev
Commit: c155e3686f554d0a46f1992530269721101cb2d3
Parents: 3202304
Author: acton393 <zhangxing610...@gmail.com>
Authored: Wed May 17 10:58:44 2017 +0800
Committer: acton393 <zhangxing610...@gmail.com>
Committed: Wed May 17 10:58:44 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c155e368/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m 
b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
index 96434b1..aa3de9d 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
@@ -314,6 +314,7 @@ static NSDictionary *_customEnvironment;
 }
 
 + (void)_originalRegisterComponents:(NSDictionary *)components {
+    NSMutableDictionary * mutableComponents = [components mutableCopy];
     void (^componentBlock)(id, id, BOOL *) = ^(id mKey, id mObj, BOOL * mStop) 
{
         
         NSString *name = mObj[@"name"];
@@ -324,23 +325,25 @@ static NSDictionary *_customEnvironment;
         }
         [self registerComponent:name 
withClass:NSClassFromString(componentClass) withProperties:pros];
     };
-    [components enumerateKeysAndObjectsUsingBlock:componentBlock];
+    [mutableComponents enumerateKeysAndObjectsUsingBlock:componentBlock];
     
 }
 
 + (void)_originalRegisterModules:(NSDictionary *)modules {
+    NSMutableDictionary * mutableModules = [modules mutableCopy];
     void (^moduleBlock)(id, id, BOOL *) = ^(id mKey, id mObj, BOOL * mStop) {
         
         [self registerModule:mKey withClass:NSClassFromString(mObj)];
     };
-    [modules enumerateKeysAndObjectsUsingBlock:moduleBlock];
+    [mutableModules enumerateKeysAndObjectsUsingBlock:moduleBlock];
 }
 
 + (void)_originalRegisterHandlers:(NSDictionary *)handlers {
+    NSMutableDictionary * mutableHandlers = [handlers mutableCopy];
     void (^handlerBlock)(id, id, BOOL *) = ^(id mKey, id mObj, BOOL * mStop) {
         [self registerHandler:mObj withProtocol:NSProtocolFromString(mKey)];
     };
-    [handlers enumerateKeysAndObjectsUsingBlock:handlerBlock];
+    [mutableHandlers enumerateKeysAndObjectsUsingBlock:handlerBlock];
 }
 
 @end

Reply via email to