1.3.3
This commit is contained in:
Родитель
510844b19d
Коммит
184229a9b9
|
@ -1,3 +1,7 @@
|
|||
== 1.3.3
|
||||
|
||||
Fix encryptForm so it can be called any number of times, as before 1.3.1
|
||||
|
||||
== 1.3.2
|
||||
|
||||
Fix problem with select elements introduced in 1.3.1
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
var Braintree = {
|
||||
sjcl: sjcl,
|
||||
version: "1.3.2"
|
||||
version: "1.3.3"
|
||||
};
|
||||
|
||||
Braintree.generateAesKey = function () {
|
||||
|
@ -162,10 +162,9 @@ Braintree.EncryptionClient = function (publicKey) {
|
|||
form = extractForm(form);
|
||||
inputs = findInputs(form);
|
||||
|
||||
if (hiddenFields.length > 0) {
|
||||
for (i = 0; i < hiddenFields.length; i++) {
|
||||
form.removeChild(hiddenFields[i]);
|
||||
}
|
||||
while (hiddenFields.length > 0) {
|
||||
form.removeChild(hiddenFields[0]);
|
||||
hiddenFields.splice(0, 1);
|
||||
}
|
||||
|
||||
for (i = 0; i < inputs.length; i++) {
|
||||
|
|
|
@ -65,6 +65,12 @@ describe("Braintree#form", function() {
|
|||
expect($('input[type="hidden"][name="credit-card-expiration-date"]').length).toBe(1);
|
||||
expect($('input[type="hidden"][name="credit-card-number"]').length).toBe(1);
|
||||
});
|
||||
|
||||
it("shouldn't throw DOM exceptions when encrypting multiple times", function() {
|
||||
this.braintree.encryptForm('braintree_form');
|
||||
this.braintree.encryptForm('braintree_form');
|
||||
this.braintree.encryptForm('braintree_form');
|
||||
});
|
||||
});
|
||||
|
||||
describe("onSubmitEncryptForm", function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче