Skip to content

Commit 8817db4

Browse files
authored
Merge pull request #23 from eliot-akira/width-height-zero
Add check for width/height zero
2 parents 66c7ce2 + 27505b6 commit 8817db4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ module.exports = function (options) {
2929
return state &&
3030
Number.isInteger(state.x) &&
3131
Number.isInteger(state.y) &&
32-
Number.isInteger(state.width) &&
33-
Number.isInteger(state.height);
32+
Number.isInteger(state.width) && state.width > 0 &&
33+
Number.isInteger(state.height) && state.height > 0;
3434
}
3535

3636
function validateState() {

0 commit comments

Comments
 (0)