Skip to content

Commit 35246b6

Browse files
committed
1.3.8
1 parent 34915e7 commit 35246b6

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
== 1.3.8
2+
3+
* fix removal of hidden fields in all browsers.
4+
15
== 1.3.7
26

3-
* Fix removal of hidden fields in IE9.
7+
* fix removal of hidden fields in ie9.
48

59
== 1.3.6
610

lib/braintree.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
var Braintree = {
1010
sjcl: sjcl,
11-
version: "1.3.7"
11+
version: "1.3.8"
1212
};
1313

1414
Braintree.generateAesKey = function () {
@@ -157,18 +157,15 @@ Braintree.EncryptionClient = function (publicKey) {
157157
self.encryptForm = function (form) {
158158
var element, encryptedValue,
159159
fieldName, hiddenField,
160-
i, inputs, bodyElement;
160+
i, inputs;
161161

162162
form = extractForm(form);
163163
inputs = findInputs(form);
164164

165165
while (hiddenFields.length > 0) {
166-
bodyElement = hiddenFields[0].ownerDocument.body;
167-
168-
if (bodyElement.contains && bodyElement.contains(hiddenFields[0])) {
166+
try {
169167
form.removeChild(hiddenFields[0]);
170-
}
171-
168+
} catch (err) {}
172169
hiddenFields.splice(0, 1);
173170
}
174171

0 commit comments

Comments
 (0)