react-native-windows 0.68.12 → 0.68.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -117,17 +117,21 @@ struct BrushCache {
117
117
  return RegisterBrush(resourceName, brush);
118
118
  }
119
119
 
120
- winrt::IInspectable resource{winrt::Application::Current().Resources().Lookup(winrt::box_value(resourceName))};
121
-
122
- if (auto brush = resource.try_as<xaml::Media::Brush>()) {
123
- return RegisterBrush(resourceName, brush);
124
- } else if (auto color = resource.try_as<winrt::Windows::UI::Color>()) {
125
- auto brush = xaml::Media::SolidColorBrush(color.value());
126
- return RegisterBrush(resourceName, brush);
120
+ const auto appResources{winrt::Application::Current().Resources()};
121
+ const auto boxedResourceName{winrt::box_value(resourceName)};
122
+ if (appResources.HasKey(boxedResourceName)) {
123
+ winrt::IInspectable resource{appResources.Lookup(boxedResourceName)};
124
+
125
+ if (auto brush = resource.try_as<xaml::Media::Brush>()) {
126
+ return RegisterBrush(resourceName, brush);
127
+ } else if (auto color = resource.try_as<winrt::Windows::UI::Color>()) {
128
+ auto brush = xaml::Media::SolidColorBrush(color.value());
129
+ return RegisterBrush(resourceName, brush);
130
+ }
127
131
  }
128
132
 
129
133
  assert(false && "Resource is not a Color or Brush");
130
- return nullptr;
134
+ return xaml::Media::SolidColorBrush(winrt::Colors::Transparent());
131
135
  }
132
136
 
133
137
  xaml::Media::Brush RegisterBrush(winrt::hstring resourceName, const xaml::Media::Brush &brush) {
@@ -143,7 +143,7 @@ bool ImageViewManager::UpdateProperty(
143
143
  } else if (propertyName == "tintColor") {
144
144
  const auto isValidColorValue = IsValidColorValue(propertyValue);
145
145
  if (isValidColorValue || propertyValue.IsNull()) {
146
- const auto color = isValidColorValue ? ColorFrom(propertyValue) : winrt::Colors::Transparent();
146
+ const auto color = isValidColorValue ? SolidColorBrushFrom(propertyValue).Color() : winrt::Colors::Transparent();
147
147
  reactImage->TintColor(color);
148
148
  }
149
149
  // Override default accessibility behavior
@@ -10,10 +10,10 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.68.12</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.68.13</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>68</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>12</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>13</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
18
  </PropertyGroup>
19
19
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.68.12",
3
+ "version": "0.68.13",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",