Skip to content

Commit

Permalink
Adjusted according to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Jun 25, 2021
1 parent 088ac05 commit 8178c01
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,14 @@ export default class SmartNodeSelectorComponent extends Component<SmartNodeSelec
(this.props.delimiter &&
this.props.delimiter !== prevProps.delimiter)
) {
let hasError = false;
let error = "";
let error: string | undefined;
try {
this.treeData = new TreeData({
treeData: this.props.data,
delimiter: this.props.delimiter,
});
} catch (e) {
this.treeData = null;
hasError = true;
error = e;
}
const nodeSelections: TreeNodeSelection[] = [];
Expand All @@ -246,7 +244,7 @@ export default class SmartNodeSelectorComponent extends Component<SmartNodeSelec
nodeSelections: nodeSelections,
currentTagIndex: this.state.currentTagIndex,
suggestionsVisible: this.state.suggestionsVisible,
hasError: hasError,
hasError: error !== undefined,
error: error,
},
() => {
Expand Down

0 comments on commit 8178c01

Please sign in to comment.