From 218cf9583260f965d69ccae1137e044ca60d8c1f Mon Sep 17 00:00:00 2001 From: Jonah <47046556+jonahb55@users.noreply.github.com> Date: Sun, 23 Jan 2022 19:21:22 -0500 Subject: [PATCH] Fix handling of nulls in auto-axis --- CHANGELOG.md | 2 +- package-lock.json | 16 ++++++++-------- package.json | 2 +- .../tabControllers/lineGraphController.mjs | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1286f46e..6aa29100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -Removed superfluous features to simplify code base. \ No newline at end of file +Fixed handling of `null` values when calculating auto-axis range. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f1dd17a3..700dcfa1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "advantage-scope", - "version": "1.13.1", + "version": "1.13.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "advantage-scope", - "version": "1.13.1", + "version": "1.13.2", "license": "MIT", "dependencies": { "electron-fetch": "^1.7.4", @@ -223,9 +223,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.18.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.6.tgz", - "integrity": "sha512-lrCEyAVs0sJ+uq5uPn2j1NkAHryhBA8Q1fP2hC2zRiOPyJBMB53ZsdmNX3yPo/sj29EH/3452h1DsIoPTiGELg==", + "version": "14.18.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.9.tgz", + "integrity": "sha512-j11XSuRuAlft6vLDEX4RvhqC0KxNxx6QIyMXNb0vHHSNPXTPeiy3algESWmOOIzEtiEL0qiowPU3ewW9hHVa7Q==", "dev": true }, "node_modules/@types/plist": { @@ -3406,9 +3406,9 @@ "dev": true }, "@types/node": { - "version": "14.18.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.6.tgz", - "integrity": "sha512-lrCEyAVs0sJ+uq5uPn2j1NkAHryhBA8Q1fP2hC2zRiOPyJBMB53ZsdmNX3yPo/sj29EH/3452h1DsIoPTiGELg==", + "version": "14.18.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.9.tgz", + "integrity": "sha512-j11XSuRuAlft6vLDEX4RvhqC0KxNxx6QIyMXNb0vHHSNPXTPeiy3algESWmOOIzEtiEL0qiowPU3ewW9hHVa7Q==", "dev": true }, "@types/plist": { diff --git a/package.json b/package.json index 9dc66c7b..577e4944 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "advantage-scope", "productName": "Advantage Scope", - "version": "1.13.1", + "version": "1.13.2", "description": "Logging tool from FRC Team 6328.", "main": "main.js", "scripts": { diff --git a/www/modules/tabControllers/lineGraphController.mjs b/www/modules/tabControllers/lineGraphController.mjs index 9b20363b..1bc0300e 100644 --- a/www/modules/tabControllers/lineGraphController.mjs +++ b/www/modules/tabControllers/lineGraphController.mjs @@ -571,6 +571,7 @@ export class LineGraphController { function arrayMin(arr) { var len = arr.length, min = Infinity; while (len--) { + if (arr[len] == null) continue if (arr[len] < min) { min = arr[len]; } @@ -581,6 +582,7 @@ export class LineGraphController { function arrayMax(arr) { var len = arr.length, max = -Infinity; while (len--) { + if (arr[len] == null) continue if (arr[len] > max) { max = arr[len]; }