Fixed 'Remove the unnecessary boolean literals' code smell.

This commit is contained in:
Akshay Joshi
2022-09-09 15:23:18 +05:30
parent ec47a2aa66
commit 3b95a416ca
21 changed files with 221 additions and 224 deletions

View File

@@ -311,9 +311,8 @@ export function GraphVisualiser({initColumns}) {
// Check the previously selected X axis column is exist in the list of
// new columns. If exists then set that as it is.
setXAxis((prevXAxis)=>{
if (prevXAxis === '<Row Number>') {
return prevXAxis;
} else if (newColumns.map((c)=>c.name).includes(prevXAxis)) {
if (prevXAxis === '<Row Number>' ||
newColumns.map((c)=>c.name).includes(prevXAxis)) {
return prevXAxis;
}
return null;

View File

@@ -929,7 +929,7 @@ export function ResultSet() {
eventBus.fireEvent(QUERY_TOOL_EVENTS.RESET_GRAPH_VISUALISER, columns);
}, [columns]);
const fetchMoreRows = async (all=false, callback)=>{
const fetchMoreRows = async (all=false, callback=undefined)=>{
if(queryData.has_more_rows) {
setIsLoadingMore(true);
const res = await rsu.current.getMoreRows(all);