- From: Wanming Lin <notifications@github.com>
- Date: Tue, 13 Nov 2018 18:31:49 -0800
- To: w3c/screen-orientation <screen-orientation@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 14 November 2018 02:32:10 UTC
`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