Index: src/i18n.js |
diff --git a/src/i18n.js b/src/i18n.js |
index 1028bbb07b3d70706290848f14110d4bee8d7dd5..53cc48714704169e6ac6d620a6299be8f206d827 100644 |
--- a/src/i18n.js |
+++ b/src/i18n.js |
@@ -1995,14 +1995,16 @@ OverrideFunction(GlobalString.prototype, 'localeCompare', function(that) { |
* If the form is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw |
* a RangeError Exception. |
*/ |
-OverrideFunction(GlobalString.prototype, 'normalize', function(form) { |
+ |
+OverrideFunction(GlobalString.prototype, 'normalize', function() { |
if (%_IsConstructCall()) { |
throw MakeTypeError(kOrdinaryFunctionCalledAsConstructor); |
} |
CHECK_OBJECT_COERCIBLE(this, "String.prototype.normalize"); |
- form = IS_UNDEFINED(form) ? 'NFC' : form; |
+ var formArg = %_Arguments(0); |
+ var form = IS_UNDEFINED(formArg) ? 'NFC' : TO_STRING_INLINE(formArg); |
var NORMALIZATION_FORMS = ['NFC', 'NFD', 'NFKC', 'NFKD']; |