Skip to content

Commit

Permalink
Fix array util
Browse files Browse the repository at this point in the history
  • Loading branch information
dastanbeksamatov committed Mar 5, 2021
1 parent 8675aaf commit 2a24443
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assembly/utils/Arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export namespace ArrayUtils {
* @param typedArr
*/
export function toU8Array(typedArr: Uint8Array): u8[] {
let res = new Array<u8>(2);
let res: u8[] = [];
for (let i = 0; i < typedArr.length; i++) {
res[i] = typedArr[i];
res.push(typedArr[i]);
}
return res;
}
Expand Down

0 comments on commit 2a24443

Please sign in to comment.