X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=javascript%2Fi18n%2Fphonenumbers%2Fasyoutypeformatter.js;h=53ee5a311087ef76316243d64f4662a661c9f227;hb=15c226ad30a2dc1b6758830ac7fcfc57a2b2a3ed;hp=d4d4dd28baba09c962aa102c73f2bae6b15fc83e;hpb=e9a367f5b13fbb627c754b5fac0f63a4a9d4df99;p=platform%2Fupstream%2Flibphonenumber.git diff --git a/javascript/i18n/phonenumbers/asyoutypeformatter.js b/javascript/i18n/phonenumbers/asyoutypeformatter.js index d4d4dd2..53ee5a3 100644 --- a/javascript/i18n/phonenumbers/asyoutypeformatter.js +++ b/javascript/i18n/phonenumbers/asyoutypeformatter.js @@ -1086,6 +1086,8 @@ i18n.phonenumbers.AsYouTypeFormatter.prototype. i18n.phonenumbers.AsYouTypeFormatter.prototype.inputDigitHelper_ = function(nextChar) { + // Note that formattingTemplate is not guaranteed to have a value, it could be + // empty, e.g. when the next digit is entered after extracting an IDD or NDD. /** @type {string} */ var formattingTemplate = this.formattingTemplate_.toString(); if (formattingTemplate.substring(this.lastMatchPosition_)