diff --git a/frameworks/ets/ets/@ohos.app.ability.Want.ets b/frameworks/ets/ets/@ohos.app.ability.Want.ets index 1389768cb6a26c4e56eeba19c1787e4ee81ce961..4f07df4f6c70e75cfee1842c2b9a160fc6aeb54b 100644 --- a/frameworks/ets/ets/@ohos.app.ability.Want.ets +++ b/frameworks/ets/ets/@ohos.app.ability.Want.ets @@ -86,7 +86,7 @@ class RecordWriter { private writeArray(arr: Array): void { this.buffer.append('['); - const length = arr.length as int; + const length = arr.length.toInt(); this.checkReferencesCycle(arr); this.store.add(arr); for (let idx = 0; idx < length; idx++) { @@ -105,7 +105,7 @@ class RecordWriter { private writeBuildArray(arr: Object, arrayValue: ArrayValue): void { this.buffer.append('['); - const length = arrayValue.getLength() as int; + const length = arrayValue.getLength().toInt(); this.checkReferencesCycle(arr); this.store.add(arr); for (let idx = 0; idx < length; idx++) {