JS: Change from getNationalPrefixFormattingRule() to getNationalPrefixFormattingRuleO...
authorroubert@google.com <roubert@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Wed, 7 Nov 2012 16:00:39 +0000 (16:00 +0000)
committerroubert@google.com <roubert@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Wed, 7 Nov 2012 16:00:39 +0000 (16:00 +0000)
Review URL: https://codereview.appspot.com/6822092

git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@542 ee073f10-1060-11df-b6a4-87a95322a99c

javascript/i18n/phonenumbers/asyoutypeformatter.js

index 53b235e..4ee983b 100644 (file)
@@ -364,7 +364,7 @@ i18n.phonenumbers.AsYouTypeFormatter.prototype.getAvailableFormats_ =
     if (!nationalPrefixIsUsedByCountry || this.isCompleteNumber_ ||
         format.getNationalPrefixOptionalWhenFormatting() ||
         this.phoneUtil_.formattingRuleHasFirstGroupOnly(
-            format.getNationalPrefixFormattingRule())) {
+            format.getNationalPrefixFormattingRuleOrDefault())) {
       if (this.isFormatEligible_(format.getFormatOrDefault())) {
         this.possibleFormats_.push(format);
       }