diff --git a/index.js b/index.js index 575ff2c..54c4b71 100644 --- a/index.js +++ b/index.js @@ -27,10 +27,10 @@ module.exports = function (options) { function hasBounds() { return state && - state.x !== undefined && - state.y !== undefined && - state.width !== undefined && - state.height !== undefined; + Number.isInteger(state.x) && + Number.isInteger(state.y) && + Number.isInteger(state.width) && + Number.isInteger(state.height); } function validateState() {