fix(ui): check for string className when handling clicks in filter input

For SVG elements there might be no className attribute so split() might raise an exception
This commit is contained in:
Łukasz Mierzwa
2019-06-10 23:13:07 +01:00
parent 4f056ba4f2
commit f2c24edff9

View File

@@ -97,7 +97,10 @@ const FilterInput = observer(
});
onInputClick = (inputReference, event) => {
if (event.target.className.split(" ").includes("form-control")) {
if (
typeof event.target.className === "string" &&
event.target.className.split(" ").includes("form-control")
) {
inputReference.input.focus();
}
};