Skip to content

Commit

Permalink
handle empty dos dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
eimrek committed Apr 10, 2024
1 parent ae24a63 commit 9e2591e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function BandsVisualizer(props) {

// basic checks
var isBands = !(!props.bandsDataList || props.bandsDataList.length == 0);
var isDos = props.dosData != undefined || props.dosData != null;
var isDos = !(!props.dosData || Object.keys(props.dosData).length === 0);
var areBoth = isBands && isDos;

useEffect(() => {
Expand Down

0 comments on commit 9e2591e

Please sign in to comment.