Skip to content

Commit fe17929

Browse files
authored
fix applyFormatters switch case statement (#804)
Replaced the return statement with a break in the switch-case block of applyFormatters, as the former was causing the premature termination of the for loop
1 parent 205a73a commit fe17929

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/react-google-charts/src/utils/GoogleChartInternal.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ export class GoogleChartInternal {
218218
formatter.options,
219219
);
220220
vizFormatter.format(dataTable, formatter.column);
221-
return;
221+
break;
222222
}
223223
case "BarFormat": {
224224
const vizFormatter = new google.visualization.BarFormat(
225225
formatter.options,
226226
);
227227
vizFormatter.format(dataTable, formatter.column);
228-
return;
228+
break;
229229
}
230230
case "ColorFormat": {
231231
const vizFormatter = new google.visualization.ColorFormat(
@@ -238,32 +238,32 @@ export class GoogleChartInternal {
238238
}
239239
}
240240
vizFormatter.format(dataTable, formatter.column);
241-
return;
241+
break;
242242
}
243243
case "DateFormat": {
244244
const vizFormatter = new google.visualization.DateFormat(
245245
formatter.options,
246246
);
247247
vizFormatter.format(dataTable, formatter.column);
248-
return;
248+
break;
249249
}
250250
case "NumberFormat": {
251251
const vizFormatter = new google.visualization.NumberFormat(
252252
formatter.options,
253253
);
254254
vizFormatter.format(dataTable, formatter.column);
255-
return;
255+
break;
256256
}
257257
case "PatternFormat": {
258258
const vizFormatter = new google.visualization.PatternFormat(
259259
formatter.options,
260260
);
261261
vizFormatter.format(dataTable, formatter.column);
262-
return;
262+
break;
263263
}
264264
default: {
265265
console.warn(`Unknown formatter type: ${formatter.type}`);
266-
return;
266+
break;
267267
}
268268
}
269269
}

0 commit comments

Comments
 (0)