fix(swipe): Count '' as "natural scrolling enabled" on Mac OS X

This value is returned if the user has never touched the system preference option at all.
This commit is contained in:
Ben Gotow 2016-02-24 20:13:04 -08:00
parent 0c320d3a28
commit 428d37b4fe

View file

@ -38,9 +38,7 @@ if (process.platform === 'darwin') {
if (err !== null) {
return;
}
if (stdout.toString().trim() === '1') {
SwipeInverted = true;
}
SwipeInverted = (stdout.toString().trim() !== '0');
});
} else if (process.platform === 'win32') {
// Currently does not matter because we don't support trackpad gestures on Win.