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