diff --git a/packages/react-financial-charts/src/utils/slidingWindow.ts b/packages/react-financial-charts/src/utils/slidingWindow.ts index 17d323336..b1145da92 100644 --- a/packages/react-financial-charts/src/utils/slidingWindow.ts +++ b/packages/react-financial-charts/src/utils/slidingWindow.ts @@ -63,11 +63,11 @@ export default function () { }); }; - slidingWindow.undefinedValue = function (...args) { - if (!args.length) { + slidingWindow.undefinedValue = function (x) { + if (!arguments.length) { return undefinedValue; } - undefinedValue = args; + undefinedValue = x; return slidingWindow; }; slidingWindow.windowSize = function (x) {