Skip to content

Commit 267356c

Browse files
committed
Bug fix
1 parent ed6107b commit 267356c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,9 @@ module.exports = (autoInit = true) => {
441441

442442
p.v.forEach((val, i) => {
443443
if (i === 0) return;
444-
if (indicator.plots[`plot_${i - 1}`]) period[indicator.plots[`plot_${i - 1}`]] = val;
445-
else period[`_plot_${i - 1}`] = val;
444+
if (indicator.plots[`plot_${i - 1}`] && !period[indicator.plots[`plot_${i - 1}`]]) {
445+
period[indicator.plots[`plot_${i - 1}`]] = val;
446+
} else period[`_plot_${i - 1}`] = val;
446447
});
447448
periods[p.i][chart.indicators[parseInt(type, 10)].name || `st${type}`] = period;
448449
}

0 commit comments

Comments
 (0)