File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -155,12 +155,11 @@ export module ad {
155
155
var borderWidth = v . borderWidth ;
156
156
var bkg = < any > nativeView . getBackground ( ) ;
157
157
158
- if ( ! types . isNullOrUndefined ( bkg ) && v . borderWidth === 0 && v . borderRadius === 0 &&
159
- ! v . style . _getValue ( style . backgroundImageProperty ) &&
160
- v . style . _getValue ( style . backgroundColorProperty ) ) {
161
- if ( bkg && bkg . setColorFilter ) {
162
- bkg . setColorFilter ( v . style . _getValue ( style . backgroundColorProperty ) . android , android . graphics . PorterDuff . Mode . SRC_IN ) ;
163
- }
158
+ if ( v instanceof btn . Button && ! types . isNullOrUndefined ( bkg ) && types . isFunction ( bkg . setColorFilter ) &&
159
+ v . borderWidth === 0 && v . borderRadius === 0 &&
160
+ types . isNullOrUndefined ( v . style . _getValue ( style . backgroundImageProperty ) ) &&
161
+ ! types . isNullOrUndefined ( v . style . _getValue ( style . backgroundColorProperty ) ) ) {
162
+ bkg . setColorFilter ( v . style . _getValue ( style . backgroundColorProperty ) . android , android . graphics . PorterDuff . Mode . SRC_IN ) ;
164
163
} else if ( v . borderWidth !== 0 || v . borderRadius !== 0 || ! backgroundValue . isEmpty ( ) ) {
165
164
166
165
if ( ! ( bkg instanceof dts . ad . BorderDrawable ) ) {
You can’t perform that action at this time.
0 commit comments