You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mo...@apache.org on 2020/08/11 06:41:51 UTC

[incubator-weex] branch master updated: [iOS] fix sometimes chooseColor return nil bug

This is an automated email from the ASF dual-hosted git repository.

moshen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b82d27  [iOS] fix sometimes chooseColor return nil bug
     new f61a4a5  Merge pull request #3249 from jianhan-he/master
7b82d27 is described below

commit 7b82d270d1f530f6e69f00aaf06e3581f9659a75
Author: linghe.lh <li...@alibaba-inc.com>
AuthorDate: Wed Jul 8 10:06:23 2020 +0800

    [iOS] fix sometimes chooseColor return nil bug
---
 ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index 31a51c8..2fd7bb7 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -1329,7 +1329,8 @@ typedef enum : NSUInteger {
             if (originalColor == [UIColor clearColor]) {
                 return originalColor;
             }
-            return [[WXSDKInstance darkSchemeColorHandler] getInvertedColorFor:originalColor ofScene:scene withDefault:originalColor];
+            UIColor* invertdColor = [[WXSDKInstance darkSchemeColorHandler] getInvertedColorFor:originalColor ofScene:scene withDefault:originalColor];
+            return invertdColor ?:originalColor;
         }
         else {
             return originalColor;