Explorar el Código

imprv err handring

kaori hace 4 años
padre
commit
4a21cf6709
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      packages/app/src/components/Navbar/AuthorInfo.jsx

+ 4 - 1
packages/app/src/components/Navbar/AuthorInfo.jsx

@@ -28,7 +28,10 @@ const AuthorInfo = (props) => {
       return <p>{infoLabelForFooter} {format(new Date(date), formatType)} by <UserPicture user={user} size="sm" /> {userLabel}</p>;
     }
     catch (err) {
-      return <p>{infoLabelForSubNav} <UserPicture user={user} size="sm" /> {userLabel}</p>;
+      if (err instanceof RangeError) {
+        return <p>{infoLabelForSubNav} <UserPicture user={user} size="sm" /> {userLabel}</p>;
+      }
+      return;
     }
   }