Browse Source

Check if fab icon was resolved when creating fab

Guy Carmeli 7 years ago
parent
commit
053fbf5aa9
1 changed files with 9 additions and 2 deletions
  1. 9
    2
      src/deprecated/platformSpecificDeprecated.android.js

+ 9
- 2
src/deprecated/platformSpecificDeprecated.android.js View File

375
 function getFab(screen) {
375
 function getFab(screen) {
376
   if (screen.fab) {
376
   if (screen.fab) {
377
     const fab = screen.fab;
377
     const fab = screen.fab;
378
-    fab.collapsedIcon = resolveAssetSource(fab.collapsedIcon).uri;
378
+    const collapsedIconUri = resolveAssetSource(fab.collapsedIcon);
379
+    if (!collapsedIconUri) {
380
+      return;
381
+    }
382
+    fab.collapsedIcon = collapsedIconUri.uri;
379
     if (fab.expendedIcon) {
383
     if (fab.expendedIcon) {
380
-      fab.expendedIcon = resolveAssetSource(fab.expendedIcon).uri;
384
+      const expendedIconUri = resolveAssetSource(fab.expendedIcon);
385
+      if (expendedIconUri) {
386
+        fab.expendedIcon = expendedIconUri.ui;
387
+      }
381
     }
388
     }
382
 
389
 
383
     if (fab.actions) {
390
     if (fab.actions) {