File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,16 @@ export class Fab extends FloatingActionButtonBase {
5353 }
5454
5555 [ backColorProperty . setNative ] ( value : Color ) {
56- this . nativeView . setBackgroundTintList (
57- android . content . res . ColorStateList . valueOf ( value . android )
58- ) ;
56+ if ( value ) {
57+ try {
58+ this . nativeView . setBackgroundTintList (
59+ android . content . res . ColorStateList . valueOf ( value . android )
60+ ) ;
61+ } catch ( error ) {
62+ // do nothing, catch bad color value
63+ console . log ( "bad background-color value: " , error ) ;
64+ }
65+ }
5966 }
6067
6168 [ backgroundColorProperty . getDefault ] ( ) : android . content . res . ColorStateList {
Original file line number Diff line number Diff line change 11{
22 "name" : " nativescript-floatingactionbutton" ,
3- "version" : " 4.0.2 " ,
3+ "version" : " 4.0.3 " ,
44 "description" : " A NativeScript plugin for Material Design Floating Action Button." ,
55 "main" : " fab" ,
66 "typings" : " index.d.ts" ,
You can’t perform that action at this time.
0 commit comments