X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/631d2a3780d7d6ae292dc4e5b8a277880e1ef2ca..1bde07ef5884a55bbb47aaf30a90b122a4810617:/src/components/warning/warning.tsx?ds=sidebyside
diff --git a/src/components/warning/warning.tsx b/src/components/warning/warning.tsx
index bd330361..d459a37d 100644
--- a/src/components/warning/warning.tsx
+++ b/src/components/warning/warning.tsx
@@ -2,12 +2,12 @@
//
// SPDX-License-Identifier: AGPL-3.0
-import * as React from "react";
-import { ErrorIcon } from "~/components/icon/icon";
+import React from "react";
+import { ErrorIcon } from "components/icon/icon";
import { Tooltip } from "@material-ui/core";
-import { disallowSlash } from "~/validators/valid-name";
+import { disallowSlash } from "validators/valid-name";
import { connect } from "react-redux";
-import { RootState } from "~/store/store";
+import { RootState } from "store/store";
interface WarningComponentProps {
text: string;
@@ -16,11 +16,12 @@ interface WarningComponentProps {
}
export const WarningComponent = ({ text, rules, message }: WarningComponentProps) =>
- rules.find(aRule => text.match(aRule) !== null)
- ? message
- ?
- :
- : null;
+ !text ?
+ : (rules.find(aRule => text.match(aRule) !== null)
+ ? message
+ ?
+ :
+ : null);
interface IllegalNamingWarningProps {
name: string;