aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2016-08-30 09:27:55 +0800
committerGitHub <noreply@github.com>2016-08-30 09:27:55 +0800
commit791e80988d889a72fee12579fa6525b6b0f15e18 (patch)
treededc156a42acb9419a7eba8decbcad98cc9cb59a /ui
parenta9c738d4d3226f61942641a41c399c75a3e9eb3e (diff)
parentc15eef9425531c86a9016d1cbad9d32f4d12edcd (diff)
downloadtangerine-wallet-browser-791e80988d889a72fee12579fa6525b6b0f15e18.tar.gz
tangerine-wallet-browser-791e80988d889a72fee12579fa6525b6b0f15e18.tar.zst
tangerine-wallet-browser-791e80988d889a72fee12579fa6525b6b0f15e18.zip
Merge pull request #596 from MetaMask/EdgeCompatibility
Edge compatibility
Diffstat (limited to 'ui')
-rw-r--r--ui/lib/persistent-form.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ui/lib/persistent-form.js b/ui/lib/persistent-form.js
index 2fd7600a2..d4dc20b03 100644
--- a/ui/lib/persistent-form.js
+++ b/ui/lib/persistent-form.js
@@ -14,7 +14,9 @@ inherits(PersistentForm, Component)
PersistentForm.prototype.componentDidMount = function () {
const fields = document.querySelectorAll('[data-persistent-formid]')
const store = this.getPersistentStore()
- fields.forEach((field) => {
+
+ for (var i = 0; i < fields.length; i++) {
+ const field = fields[i]
const key = field.getAttribute('data-persistent-formid')
const cached = store[key]
if (cached !== undefined) {
@@ -22,7 +24,7 @@ PersistentForm.prototype.componentDidMount = function () {
}
field.addEventListener(eventName, this.persistentFieldDidUpdate.bind(this))
- })
+ }
}
PersistentForm.prototype.getPersistentStore = function () {
@@ -50,8 +52,10 @@ PersistentForm.prototype.persistentFieldDidUpdate = function (event) {
PersistentForm.prototype.componentWillUnmount = function () {
const fields = document.querySelectorAll('[data-persistent-formid]')
- fields.forEach((field) => {
+ for (var i = 0; i < fields.length; i++) {
+ const field = fields[i]
field.removeEventListener(eventName, this.persistentFieldDidUpdate.bind(this))
- })
+ }
this.setPersistentStore({})
}
+