From eaec46d02d0ec7166bafbcc103eb02965d6e3b49 Mon Sep 17 00:00:00 2001 From: aengu Date: Sat, 13 Jul 2024 00:27:39 +0800 Subject: [PATCH] =?UTF-8?q?portMapList=E6=9C=89=E4=B8=AA=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E6=97=B6=EF=BC=8CportMapList.isEmpty()=20?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=20TypeError:=20is=20not=20callable=EF=BC=8C?= =?UTF-8?q?=E5=B0=9A=E4=B8=8D=E6=B8=85=E6=A5=9A=E5=8E=9F=E5=9B=A0=E3=80=82?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=88=A4=E6=96=ADlength?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: aengu --- .../main/ets/components/plugin/types/WebMessageCompatExt.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/types/WebMessageCompatExt.ets b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/types/WebMessageCompatExt.ets index 604f1cde..d00275cb 100644 --- a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/types/WebMessageCompatExt.ets +++ b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/types/WebMessageCompatExt.ets @@ -49,7 +49,7 @@ export default class WebMessageCompatExt { let type: number = map.get("type") as number let portMapList: List> = map.get("ports") as List> let ports: List | null = null; - if (portMapList != null && !portMapList.isEmpty()) { + if (portMapList != null && portMapList.length > 0 ) { ports = new List(); for (let i = 0; i < portMapList.length; i++) { ports.add(WebMessagePortCompatExt.fromMap(portMapList[i])); -- Gitee