CIDARLAB / 3DuF

Initialization in variable declarations against recommended approach JS-0119
Anti-pattern
Minor
15 days ago3 years old
Variable 'distance' should be initialized on declaration
1782        }
1783        // Split out the handle positioning logic so the Move event can use it, too
1784        function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue, smoothSteps) {
1785            var distance;1786            // For sliders with multiple handles, limit movement to the other handle.
1787            // Apply the margin option by adding it to the handle positions.
1788            if (scope_Handles.length > 1 && !options.events.unconstrained) {
Variable 'to' should be initialized on declaration
1630                return true;
1631            }
1632            event.preventDefault();
1633            var to;1634            if (isUp || isDown) {
1635                var direction = isDown ? 0 : 1;
1636                var steps = getNextStepsForHandle(handleNumber);
Variable 'handle' should be initialized on declaration
1494            if (data.handleNumbers.some(isHandleDisabled)) {
1495                return;
1496            }
1497            var handle;1498            if (data.handleNumbers.length === 1) {
1499                var handleOrigin = scope_Handles[data.handleNumbers[0]];
1500                handle = handleOrigin.children[0];
Variable '_b' should be initialized on declaration
1212            return indexes;
1213        }
1214        function addMarking(spread, filterFunc, formatter) {
1215            var _a, _b;1216            var element = scope_Document.createElement("div");
1217            var valueSizeClasses = (_a = {},
1218                _a[exports.PipsType.None] = "",
Variable '_a' should be initialized on declaration
1212            return indexes;
1213        }
1214        function addMarking(spread, filterFunc, formatter) {
1215            var _a, _b;1216            var element = scope_Document.createElement("div");
1217            var valueSizeClasses = (_a = {},
1218                _a[exports.PipsType.None] = "",