From d0d8868a43c0478b3cc8e5ab976730756e408b02 Mon Sep 17 00:00:00 2001 From: xieweilyg Date: Tue, 24 Mar 2026 09:36:13 +0800 Subject: [PATCH 1/2] fix(ios): add type check for imageURI in createUIImageFromURI --- packages/core/ui/styling/background.ios.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/ui/styling/background.ios.ts b/packages/core/ui/styling/background.ios.ts index 613971e528..b1ea750e12 100644 --- a/packages/core/ui/styling/background.ios.ts +++ b/packages/core/ui/styling/background.ios.ts @@ -184,6 +184,10 @@ export namespace ios { const style = view.style; if (imageURI) { + if (typeof imageURI !== 'string') { + callback(null); + return; + } const match = imageURI.match(uriPattern); if (match && match[2]) { imageURI = match[2]; From 8c3fd34c7c4bf28357463bfd73446b753981ba9e Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Fri, 27 Mar 2026 15:29:06 -0700 Subject: [PATCH 2/2] chore: formatting Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- packages/core/ui/styling/background.ios.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/ui/styling/background.ios.ts b/packages/core/ui/styling/background.ios.ts index b1ea750e12..315a1b5988 100644 --- a/packages/core/ui/styling/background.ios.ts +++ b/packages/core/ui/styling/background.ios.ts @@ -185,9 +185,9 @@ export namespace ios { if (imageURI) { if (typeof imageURI !== 'string') { - callback(null); - return; - } + callback(null); + return; + } const match = imageURI.match(uriPattern); if (match && match[2]) { imageURI = match[2];