Skip to content

Commit

Permalink
Merge pull request #20 from MolotovTv/fix_wrong_window_state
Browse files Browse the repository at this point in the history
Fix: corrupted x,y in window-state.json trigger runtime error
  • Loading branch information
mawie81 committed Feb 7, 2017
2 parents 9a54b29 + 2f59267 commit b46f1d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit b46f1d5

Please sign in to comment.