Skip to content

Commit

Permalink
Merge pull request #23 from eliot-akira/width-height-zero
Browse files Browse the repository at this point in the history
Add check for width/height zero
  • Loading branch information
mawie81 committed Apr 13, 2017
2 parents 66c7ce2 + 27505b6 commit 8817db4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ module.exports = function (options) {
return state &&
Number.isInteger(state.x) &&
Number.isInteger(state.y) &&
Number.isInteger(state.width) &&
Number.isInteger(state.height);
Number.isInteger(state.width) && state.width > 0 &&
Number.isInteger(state.height) && state.height > 0;
}

function validateState() {
Expand Down

0 comments on commit 8817db4

Please sign in to comment.