Skip to content

Commit 37d4fd8

Browse files
committed
discard new lines when 8 limit is reached
1 parent b751586 commit 37d4fd8

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arduino-serial-plotter-webapp",
3-
"version": "0.0.15",
3+
"version": "0.0.16",
44
"dependencies": {},
55
"license": "AGPL",
66
"scripts": {

src/fakeMessagsGenerators.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const genNamedVarValPair = (i: number) => {
2626
export const namedVariables = () => {
2727
const messages: string[] = [];
2828

29-
for (let i = 1; i <= 7; i++) {
29+
for (let i = 1; i <= 9; i++) {
3030
let pair = genNamedVarValPair(i);
3131
messages.push(pair);
3232
}

src/utils.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ export const addDataPoints = (
8484
// add missing datasets to the chart
8585
existingDatasetNames.length < 8 &&
8686
datasetNames.forEach((datasetName) => {
87-
if (!existingDatasetNames.includes(datasetName)) {
87+
if (
88+
!existingDatasetNames.includes(datasetName) &&
89+
existingDatasetNames.length < 8
90+
) {
8891
const newDataset = {
8992
data: [],
9093
label: datasetName,

0 commit comments

Comments
 (0)