v1.0.1 - Fix bug with diff where undefined cells would cause an error.

This commit is contained in:
Peter 2021-02-07 18:59:28 +08:00
parent f48cc8ec23
commit 75af4edf8a
4 changed files with 12 additions and 5 deletions

View File

@ -44,3 +44,10 @@ View raw response\
View differences in data (You'll be notified as well when the data changes)\
You can also view the differences (which includes data not in the table) in JSON form.\
![Diff table](./preview-images/diff-table.png)
## Changelog
---
| Date | Version | Changes |
| --- | --- | --- |
| 2021-01-08 | 1.0.0 | Initial release. |
| 2021-02-07 | 1.0.1 | Fix bug with diff where undefined cells would cause an error. |

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "spacex-cli",
"version": "0.1.0",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "spacex-cli",
"version": "1.0.0",
"version": "1.0.1",
"description": "SpaceX upcoming launch tracker",
"main": "spacex-cli.js",
"scripts": {

View File

@ -79,8 +79,8 @@ this.diffTable = ((A,B) => {
var row = [[''],[''],Array(B[i].length).fill('')];
var mod = false;
for ( var j = 0; j < B[i].length; j++ ) {
var a = A[i][j];
var b = B[i][j];
var a = A[i] ? (A[i][j] ? A[i][j] : "<NULL>") : "<NULL>";
var b = B[i] ? (B[i][j] ? B[i][j] : "<NULL>") : "<NULL>";
if (a !== b) {
a = COLOR.DANGER(a);
b = COLOR.SUCCESS(b);