mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:45:07 +00:00
LibJS: Do not trim whitespace from property names when they're numbers
Fixes #7803.
This commit is contained in:
parent
3abcfcc178
commit
c5073cb287
2 changed files with 8 additions and 1 deletions
|
@ -0,0 +1,7 @@
|
|||
test("indexing the array doesn't strip whitespace if it's a number", () => {
|
||||
var a = [];
|
||||
a[1] = 1;
|
||||
|
||||
expect(a["1"]).toBe(1);
|
||||
expect(a[" 1 "]).toBeUndefined();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue