!361 Boolean casts fix part two

Merge pull request !361 from Maksim Khramov/casts-fix-part-two
This commit is contained in:
openharmony_ci 2023-06-08 12:15:24 +00:00 committed by Gitee
commit a9b421c0c4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 4 additions and 4 deletions

View File

@ -144,7 +144,7 @@ class ScreenManager {
}
let cb;
let i = cbs.length;
while (i-- != 0) {
while (i-- > 0) {
cb = cbs[i];
if (cb === fn || cb.fn === fn) {
cbs.splice(i, 1);

View File

@ -30,7 +30,7 @@ export function hiSysEventDataQueryTimedOut(interfaceName: string): number {
params: params
};
hiSysEvent.write(info, (err: Error): void => {
if(err) {
if(err != null) {
Log.error(TAG, 'fail to return hiSysEvent');
}
});

View File

@ -462,7 +462,7 @@ export struct AlbumSetPage {
isBigCard: true,
})
}.columnStart(0).columnEnd(1)
} else if ((item != undefined && item != null) && (item.get() != undefined && item.get() != null)) {
} else if (item != null && item.get() != null) {
GridItem() {
AlbumGridItemNewStyle({
item: item.get(),

View File

@ -97,4 +97,4 @@ export struct PhotoSwiper {
})
.disableSwipe(this.canSwipe)
}
}
}