diff --git a/common/base/src/main/ets/manager/ScreenManager.ts b/common/base/src/main/ets/manager/ScreenManager.ts index da3b306b..22dd8e50 100644 --- a/common/base/src/main/ets/manager/ScreenManager.ts +++ b/common/base/src/main/ets/manager/ScreenManager.ts @@ -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); diff --git a/common/base/src/main/ets/utils/hisysEventUtil.ts b/common/base/src/main/ets/utils/hisysEventUtil.ts index 5fa0f123..e6602116 100644 --- a/common/base/src/main/ets/utils/hisysEventUtil.ts +++ b/common/base/src/main/ets/utils/hisysEventUtil.ts @@ -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'); } }); diff --git a/entry/src/main/ets/feature/album/view/AlbumSetPage.ets b/entry/src/main/ets/feature/album/view/AlbumSetPage.ets index 0dac263e..7f09538d 100644 --- a/entry/src/main/ets/feature/album/view/AlbumSetPage.ets +++ b/entry/src/main/ets/feature/album/view/AlbumSetPage.ets @@ -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(), diff --git a/features/browser/src/main/ets/components/PhotoSwiper.ets b/features/browser/src/main/ets/components/PhotoSwiper.ets index 4bbd639a..de1852e2 100644 --- a/features/browser/src/main/ets/components/PhotoSwiper.ets +++ b/features/browser/src/main/ets/components/PhotoSwiper.ets @@ -97,4 +97,4 @@ export struct PhotoSwiper { }) .disableSwipe(this.canSwipe) } -} \ No newline at end of file +}