-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugBugsBugs
Description
javascript/src/models/Language.js
Line 107 in 12f0a50
| this.#abbreviation = new String(val); |
Describe the bug
Using a primitive wrapper object (new String) here causes unexpected behavior, because unlike normal instantiation of primitives, the wrapper object is not discarded after instantiation. In the code above, typeof this.#abbreviation will yield object rather than string.
Fix
The above code should either be converted back to the primitive value this.#abbreviation = (new String(val)).valueOf(), or just removed this.#abbreviation = val;. Probably the latter.
Reference
Metadata
Metadata
Assignees
Labels
bugBugsBugs