mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Linted
This commit is contained in:
parent
a8e40ffe7a
commit
6f082dd9e7
@ -1,7 +1,7 @@
|
||||
const inherits = require('util').inherits
|
||||
const Component = require('react').Component
|
||||
const defaultKey = 'persistent-form-default'
|
||||
const eventName = 'keyup'//.persistent-form-change'//.persistent-form-change'
|
||||
const eventName = 'keyup'
|
||||
|
||||
module.exports = PersistentForm
|
||||
|
||||
@ -16,7 +16,6 @@ PersistentForm.prototype.componentDidMount = function () {
|
||||
const store = this.getPersistentStore()
|
||||
fields.forEach((field) => {
|
||||
const key = field.getAttribute('data-persistent-formid')
|
||||
const val = field.value
|
||||
const cached = store[key]
|
||||
if (cached !== undefined) {
|
||||
field.value = cached
|
||||
@ -51,7 +50,6 @@ PersistentForm.prototype.persistentFieldDidUpdate = function (event) {
|
||||
|
||||
PersistentForm.prototype.componentWillUnmount = function () {
|
||||
const fields = document.querySelectorAll('[data-persistent-formid]')
|
||||
const store = this.getPersistentStore()
|
||||
fields.forEach((field) => {
|
||||
field.removeEventListener(eventName, this.persistentFieldDidUpdate.bind(this))
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user