mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 09:22:53 +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
Notes:
sideshowbarker
2024-07-18 12:03:49 +09:00
Author: https://github.com/sin-ack
Commit: c5073cb287
Pull-request: https://github.com/SerenityOS/serenity/pull/8112
Issue: https://github.com/SerenityOS/serenity/issues/7803
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/trflynn89
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