File tree 2 files changed +11
-4
lines changed
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 {
53
53
}
54
54
55
55
[ 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
+ }
59
66
}
60
67
61
68
[ backgroundColorProperty . getDefault ] ( ) : android . content . res . ColorStateList {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-floatingactionbutton" ,
3
- "version" : " 4.0.2 " ,
3
+ "version" : " 4.0.3 " ,
4
4
"description" : " A NativeScript plugin for Material Design Floating Action Button." ,
5
5
"main" : " fab" ,
6
6
"typings" : " index.d.ts" ,
You can’t perform that action at this time.
0 commit comments