Skip to content

Commit

Permalink
Fix: Float16Array#join.length
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Jun 26, 2022
1 parent 0b17ba6 commit 4809d85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Float16Array.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1063,13 +1063,13 @@ export class Float16Array {
}

/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join */
join(...opts) {
join(separator) {
assertFloat16Array(this);
const float16bitsArray = getFloat16BitsArray(this);

const array = copyToArray(float16bitsArray);

return ArrayPrototypeJoin(array, ...safeIfNeeded(opts));
return ArrayPrototypeJoin(array, separator);
}

/** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring */
Expand Down
4 changes: 2 additions & 2 deletions test/Float16Array.js
Original file line number Diff line number Diff line change
Expand Up @@ -1828,8 +1828,8 @@ describe("Float16Array", () => {
assert(Float16Array.prototype.join.name === "join");
});

it("property `length` is 0", () => {
assert(Float16Array.prototype.join.length === 0);
it("property `length` is 1", () => {
assert(Float16Array.prototype.join.length === 1);
});

it("check join", () => {
Expand Down

0 comments on commit 4809d85

Please sign in to comment.