From e283128c91a00ea95425e2aad4d97514cffe75c8 Mon Sep 17 00:00:00 2001 From: Clay Date: Tue, 24 Sep 2024 10:48:08 +0800 Subject: [PATCH] update definitions --- test/helpers/feature-emulation.helpers.js | 28 ++++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/test/helpers/feature-emulation.helpers.js b/test/helpers/feature-emulation.helpers.js index 9420170d..4d077fda 100644 --- a/test/helpers/feature-emulation.helpers.js +++ b/test/helpers/feature-emulation.helpers.js @@ -1015,7 +1015,7 @@ case 'ar': number = Number(this); if (isNaN(number)) - returnValue = 'ليس\xa0رقم'; + returnValue = context.arabicNaNString || 'ليس'; else if (context.shortLocales) { returnValue = @@ -1025,7 +1025,7 @@ case 'ar-td': number = Number(this); if (isNaN(number)) - returnValue = 'ليس\xa0رقم'; + returnValue = context.arabicNaNString || 'ليس'; else { returnValue = @@ -1045,6 +1045,7 @@ LOCALE_NUMERALS_EXT: function () { + this.arabicNaNString = 'ليس\xa0رقم'; registerNumberToLocaleStringAdapter ( this, @@ -1054,12 +1055,6 @@ var number; switch (locale) { - case 'ar': - case 'ar-td': - number = Number(this); - if (isNaN(number)) - returnValue = 'ليس\xa0رقم'; - break; case 'bn': number = Number(this); if (!isNaN(number)) @@ -1117,6 +1112,7 @@ LOCALE_NUMERALS_IE11_WIN7_8: function () { + this.arabicNaNString = 'ليس\xa0برقم'; registerNumberToLocaleStringAdapter ( this, @@ -1128,18 +1124,12 @@ { case 'ar': case 'ar-td': - number = Number(this); - if (isNaN(number)) - returnValue = 'ليس\xa0برقم'; - else + switch (+this) // In Internet Explorer 9, +this is different from this. { - switch (+this) // In Internet Explorer 9, +this is different from this. - { - case Infinity: - return '+لا\xa0نهاية'; - case -Infinity: - return '-لا\xa0نهاية'; - } + case Infinity: + return '+لا\xa0نهاية'; + case -Infinity: + return '-لا\xa0نهاية'; } break; case 'cz':