From 501ad372d7c97286319eb24e82aadbe3f7679cd6 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Mon, 22 Aug 2016 18:13:32 +0300 Subject: [PATCH] Optimization --- tns-core-modules/ui/button/button.ios.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/button/button.ios.ts b/tns-core-modules/ui/button/button.ios.ts index 26d9f8b75..361f3dc92 100644 --- a/tns-core-modules/ui/button/button.ios.ts +++ b/tns-core-modules/ui/button/button.ios.ts @@ -296,8 +296,9 @@ export class ButtonStyler implements style.Styler { } } - if (button.style.color && button.style.color.ios){ - dict.set(NSForegroundColorAttributeName, button.style.color.ios); + let buttonColor = button.style.color; + if (buttonColor){ + dict.set(NSForegroundColorAttributeName, buttonColor.ios); } if (dict.size > 0){