Skip to content

Commit 275e454

Browse files
committed
image.pick add option: showCamera
1 parent 7fe2e0d commit 275e454

File tree

6 files changed

+43
-52
lines changed

6 files changed

+43
-52
lines changed

.babelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
22
"presets": ["env"]
33
}
4-

ANDROID_NOTICE.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

lib/media/image/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ var pick = function pick(opts, cb) {
2727
limit: opts.limit,
2828
quality: opts.quality,
2929
width: opts.width || null,
30-
height: opts.height || null
30+
height: opts.height || null,
31+
showCamera: opts.showCamera || false
3132
}, function (ret) {
33+
if (ret === null) {
34+
return;
35+
}
36+
3237
ret = ret || {};
3338

3439
if (ret.error) {

package-lock.json

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "natjs",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"description": "Next generation mobile framework for building native / hybrid apps.",
55
"main": "lib",
66
"scripts": {

src/media/image/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ const pick = (opts, cb) => {
2525
limit: opts.limit,
2626
quality: opts.quality,
2727
width: opts.width || null,
28-
height: opts.height || null
28+
height: opts.height || null,
29+
showCamera: opts.showCamera || false
2930
}, (ret) => {
31+
if (ret === null) {
32+
return
33+
}
34+
3035
ret = ret || {}
3136

3237
if (ret.error) {

0 commit comments

Comments
 (0)