[
https://issues.apache.org/jira/browse/CB-9443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14652543#comment-14652543
]
ASF GitHub Bot commented on CB-9443:
------------------------------------
Github user muratsu commented on the pull request:
https://github.com/apache/cordova-plugin-camera/pull/111#issuecomment-127409849
Sorry didn't see your comment earlier.
In terms of perf, I think this the usage of `if/else` vs `switch` is not
really important here. Since we're only executing it once, the perf difference
is not going to be noticable either case.
Readability is a bit more subjective - I don't have a preference in this
case. I tend to use switches only when I have fall-through cases.
I wasn't familiar with `switch(true)` pattern. It seemed like an
anti-pattern to me at first but looks like it is a common pattern in dynamic
languages. I'll revert it back to switch.
> Windows camera picks incorrect maxResolution
> --------------------------------------------
>
> Key: CB-9443
> URL: https://issues.apache.org/jira/browse/CB-9443
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Camera
> Environment: Windows Desktop, Windows Phone 10
> Reporter: Murat Sutunc
> Assignee: Murat Sutunc
> Labels: Windows
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]