Re: [w3c/screen-orientation] cordova-plugin-screen-orientation does not work (#123)

`screen.orientation.lock()` is a Promise, which will always return a Promise object, i.e. it will be always `true` in your `if` condition.
You should use `Promise.then()....catch()` instead of `try..catch`, or `async/await` with `try...catch`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/screen-orientation/issues/123#issuecomment-438515157

Received on Wednesday, 14 November 2018 02:32:10 UTC