diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm index 46bed10b29..4f97ffcfb1 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm +++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm @@ -278,7 +278,7 @@ - (NSDictionary *)styles { NSDictionary *styles; pthread_mutex_lock(&_propertyMutex); - styles = _styles; + styles = [_styles copy]; pthread_mutex_unlock(&_propertyMutex); return styles; } @@ -287,7 +287,7 @@ - (NSDictionary *)pseudoClassStyles { NSDictionary *pseudoClassStyles; pthread_mutex_lock(&_propertyMutex); - pseudoClassStyles = _pseudoClassStyles; + pseudoClassStyles = [_pseudoClassStyles copy]; pthread_mutex_unlock(&_propertyMutex); return pseudoClassStyles; @@ -302,7 +302,7 @@ - (NSDictionary *)attributes { NSDictionary *attributes; pthread_mutex_lock(&_propertyMutex); - attributes = _attributes; + attributes = [_attributes copy]; pthread_mutex_unlock(&_propertyMutex); return attributes;