From 51dc0fb901daf56cd18ee11cc0f7b5aaf3c013a7 Mon Sep 17 00:00:00 2001 From: Jaka Daneu <44704999+jalezi@users.noreply.github.com> Date: Thu, 29 Apr 2021 18:32:20 +0200 Subject: [PATCH] feat(navigateToCustomChart): add console.log series length & index (hoverIndex) --- navigateToCustomChart.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);