diff --git a/navigateToCustomChart.js b/navigateToCustomChart.js index 743b21f..d443f06 100644 --- a/navigateToCustomChart.js +++ b/navigateToCustomChart.js @@ -33,7 +33,10 @@ module.exports = async ({ const performOnElement = async () => { const index = which instanceof Function ? which(hoverIndex) : which; - const button = buttons[what][index]; + const series = buttons[what]; + console.log(`Series length: ${series.length}. Index: ${index}`); + + const button = series[index]; let text; if (!options?.skipContent) { @@ -51,6 +54,8 @@ module.exports = async ({ const series = buttons[what]; const index = which instanceof Function ? which(hoverIndex) : which; + console.log(`Series length: ${series.length}. Index: ${index}`); + let result; if (series) { result = await func(series, index, options);