diff --git a/frameworks/ets/ets/@ohos.app.ability.Want.ets b/frameworks/ets/ets/@ohos.app.ability.Want.ets index 3d0cbd3d0084e838af8d128476217b44c9005d6c..d6ec6e547d0ccd1fdf1b84e48fa98b2b637c782d 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++) {