diff --git a/README.md b/README.md index a86535c..d8662b3 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,11 @@ 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) \ No newline at end of file +![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. | \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c5c0d0e..21f4924 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "spacex-cli", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 573813b..10c4b19 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/tools/format-tools.js b/tools/format-tools.js index 213055a..7523fd8 100644 --- a/tools/format-tools.js +++ b/tools/format-tools.js @@ -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] : "") : ""; + var b = B[i] ? (B[i][j] ? B[i][j] : "") : ""; if (a !== b) { a = COLOR.DANGER(a); b = COLOR.SUCCESS(b);