From ddda198545634af5d578f35fe9ada1b935b9323d Mon Sep 17 00:00:00 2001 From: Boglarka Haag Date: Wed, 23 Jul 2025 13:40:37 +0200 Subject: [PATCH] Correct string of typeof Change-Id: I203b320adeb342caaa784788b0ee97f914f1c5ca Signed-off-by: Haag Boglarka --- frameworks/ets/ets/@ohos.notificationManager.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/ets/ets/@ohos.notificationManager.ets b/frameworks/ets/ets/@ohos.notificationManager.ets index 3bd9e4e93..a5ed7478d 100644 --- a/frameworks/ets/ets/@ohos.notificationManager.ets +++ b/frameworks/ets/ets/@ohos.notificationManager.ets @@ -238,13 +238,13 @@ export default namespace notificationManager { if (slot == null) { return errorParamInvalid; } - if (slot.lockscreenVisibility !== undefined && typeof slot.lockscreenVisibility === 'number') { + if (slot.lockscreenVisibility !== undefined && typeof slot.lockscreenVisibility === 'int') { const num = slot.lockscreenVisibility ?? -1; if (num < 0) { return errorParamInvalid; } } - if (slot.lightColor !== undefined && typeof slot.lightColor === 'number') { + if (slot.lightColor !== undefined && typeof slot.lightColor === 'int') { const num = slot.lightColor ?? -1; if (num < 0) { return errorParamInvalid; @@ -625,13 +625,13 @@ export default namespace notificationManager { if (request?.appInstanceKey !== undefined && request?.appInstanceKey?.trim() === '') { return errorParamInvalid; } - if (request?.color !== undefined && typeof request.color === 'number') { + if (request?.color !== undefined && typeof request.color === 'long') { const num = request.color ?? -1; if (num < 0) { return errorParamInvalid; } } - if (request?.badgeNumber !== undefined && typeof request.badgeNumber === 'number') { + if (request?.badgeNumber !== undefined && typeof request.badgeNumber === 'long') { const num = request.badgeNumber ?? -1; if (num < 0) { return errorParamInvalid; -- Gitee