update interfaces/kits/picker/picker.js.

Signed-off-by: BrainL <libuyan1@huawei.com>
This commit is contained in:
BrainL 2024-09-09 04:50:23 +00:00 committed by Gitee
parent 015884e072
commit 1454aecf2b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -317,7 +317,7 @@ function getDocumentPickerSelectResult(args) {
error: undefined,
data: undefined
};
if (args.resultCode === undefined) {
if (args === undefined || args.resultCode === undefined) {
selectResult.error = getErr(ErrCode.RESULT_ERROR);
console.log('[picker] document select selectResult: ' + JSON.stringify(selectResult));
return selectResult;
@ -418,7 +418,7 @@ function getAudioPickerSelectResult(args) {
error: undefined,
data: undefined
};
if (args.resultCode === undefined) {
if (args === undefined || args.resultCode === undefined) {
selectResult.error = getErr(ErrCode.RESULT_ERROR);
console.log('[picker] getAudioPickerSelectResult selectResult: ' + JSON.stringify(selectResult));
return selectResult;