react-hammerjs
react-hammerjs copied to clipboard
global "direction" variable
In src/Hammer.js:
function updateHammer (hammer, props) {
if (props.hasOwnProperty('vertical')) {
console.warn('vertical is deprecated, please use `direction` instead');
}
var directionProp = props.direction;
if (directionProp || props.hasOwnProperty('vertical')) {
direction = directionProp ? directionProp : (props.vertical ? 'DIRECTION_ALL' : 'DIRECTION_HORIZONTAL');
so it's creating a global window.direction variable, which is a bug.
eslint, jshint, jscs... etc etc. Please, check your code with any of them. They all would notify such a non declared variable (that hence becomes a global variable).