diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 19:36:27 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 19:36:27 +0000 |
commit | 7a324b80812ab8902b14f1dbba8af6b1a3fb0434 (patch) | |
tree | 6cbea152dbaca2955736a170400727a35907a4b8 | |
parent | 0ac63c18600b23eeb8ad2909afae33e998d656bb (diff) | |
download | chromium_src-7a324b80812ab8902b14f1dbba8af6b1a3fb0434.zip chromium_src-7a324b80812ab8902b14f1dbba8af6b1a3fb0434.tar.gz chromium_src-7a324b80812ab8902b14f1dbba8af6b1a3fb0434.tar.bz2 |
DOMUI: Clear the credit card select options when setting the default select
options. This is a speculative fix for a bug where the dates are added
twice.
BUG=60578
TEST=none
Review URL: http://codereview.chromium.org/4181003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63927 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/options/autofill_edit_creditcard_overlay.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js b/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js index 0050e77..0ee9e1a 100644 --- a/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js +++ b/chrome/browser/resources/options/autofill_edit_creditcard_overlay.js @@ -105,6 +105,7 @@ cr.define('options', function() { setDefaultSelectOptions_: function() { // Set the 'Expiration month' default options. var expirationMonth = $('expirationMonth'); + expirationMonth.options.length = 0; for (var i = 1; i <= 12; ++i) { var text; if (i < 10) @@ -120,6 +121,8 @@ cr.define('options', function() { // Set the 'Expiration year' default options. var expirationYear = $('expirationYear'); + expirationYear.options.length = 0; + var date = new Date(); var year = parseInt(date.getFullYear()); for (var i = 0; i < 10; ++i) { |