Skip to content

Commit

Permalink
js test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
petethepig committed Aug 9, 2021
1 parent b60a9a3 commit fda1a9a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.
41 changes: 0 additions & 41 deletions webapp/__tests__/Label.spec.js

This file was deleted.

2 changes: 1 addition & 1 deletion webapp/__tests__/NameSelector.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ configure({ adapter: new Adapter() });
const store = mockStore({});

const props = {
labels: [{ name: "__name__", value: "hotrod.golang.customer" }],
query: "hotrod.golang.customer",
names: ["hotrod.golang.customer", "hotrod.golang.driver"],
};

Expand Down
2 changes: 1 addition & 1 deletion webapp/javascript/components/NameSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function NameSelector(props) {
const selectAppName = (event) => {
actions.setQuery(event.target.value+"{}");
};
let defaultValue = query.replace(/\{.*/g, "");
let defaultValue = (query || "").replace(/\{.*/g, "");
if(names && names.indexOf(defaultValue) === -1) {
defaultValue = defKey;
}
Expand Down

0 comments on commit fda1a9a

Please sign in to comment.