!165 update securitylabel.js

Merge pull request !165 from raoxian/master
This commit is contained in:
openharmony_ci
2022-02-16 09:50:00 +00:00
committed by Gitee
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -22,10 +22,10 @@ export function mockSecurityLabel() {
" Previewer may be different from that on a real device.")
const len = args.length
if (typeof args[len - 1] === 'function') {
args[len - 1].call(this, paramMock.businessErrorMock, paramMock.paramBooleanMock)
args[len - 1].call(this, paramMock.businessErrorMock)
} else {
return new Promise((resolve, reject) => {
resolve(paramMock.paramBooleanMock);
resolve();
})
}
},