Skip to content

Commit

Permalink
Some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVelarde committed Jun 18, 2021
1 parent 76ac9a0 commit b598861
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/react-widgets/src/widgets/CategoryWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function CategoryWidget(props) {
useEffect(() => {
if (data && isLoading) {
const _filters = getApplicableFilters(filters, id);

getCategories({
data,
column,
Expand All @@ -66,7 +67,6 @@ function CategoryWidget(props) {
})
.catch((error) => {
setIsLoading(false);
if (error.name === 'AbortError') return;
if (onError) onError(error);
});
} else {
Expand Down
1 change: 0 additions & 1 deletion packages/react-widgets/src/widgets/FormulaWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function FormulaWidget(props) {
})
.catch((error) => {
setIsLoading(false);
if (error.name === 'AbortError') return;
if (onError) onError(error);
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-widgets/src/widgets/HistogramWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function HistogramWidget(props) {
useEffect(() => {
if (data && isLoading) {
const _filters = getApplicableFilters(filters, id);

getHistogram({
data,
column,
Expand All @@ -84,7 +85,6 @@ function HistogramWidget(props) {
})
.catch((error) => {
setIsLoading(false);
if (error.name === 'AbortError') return;
if (onError) onError(error);
});
} else {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-widgets/src/widgets/PieWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ function PieWidget({
useEffect(() => {
const abortController = new AbortController();
if (data && credentials && isLoading) {
const filters = getApplicableFilters(source.filters, id);
const _filters = getApplicableFilters(source.filters, id);

getCategories({
column,
operation,
operationColumn,
data,
filters,
filters: _filters,
credentials,
viewportFeatures: viewportFeaturesReady[dataSource] || false,
dataSource,
Expand All @@ -74,7 +75,6 @@ function PieWidget({
})
.catch((error) => {
setIsLoading(false);
if (error.name === 'AbortError') return;
if (onError) onError(error);
});
} else {
Expand Down

0 comments on commit b598861

Please sign in to comment.