Fix blank error message when using Serial on Firefox (#1254)
* add checks for both bluetooth and serial in the FeatureErrorMessage logic * move the check further down and only show if neither needsSecureContext and needsFeature are empty --------- Co-authored-by: Hunter275 <hunterthor275@gmail.com>
This commit is contained in:
co-authored by
Hunter275
parent
2578415b83
commit
38c7569d0f
@@ -115,6 +115,10 @@ const FeatureErrorMessage = ({ missingFeatures, tabId }: FeatureErrorProps) => {
|
|||||||
? "Web Serial"
|
? "Web Serial"
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
if (!needsFeature && !needsSecureContext) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-start gap-2 bg-red-500 p-4 rounded-md text-sm mt-4">
|
<div className="flex flex-col items-start gap-2 bg-red-500 p-4 rounded-md text-sm mt-4">
|
||||||
<div className="flex items-center gap-2 w-full">
|
<div className="flex items-center gap-2 w-full">
|
||||||
|
|||||||
Reference in New Issue
Block a user