mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
fix setInterval usage in mobx examples to work in firefox (#3769)
This commit is contained in:
parent
a8d07af355
commit
74866edc40
|
@ -14,7 +14,7 @@ const Store = types
|
|||
// mobx-state-tree doesn't allow anonymous callbacks changing data
|
||||
// pass off to another action instead
|
||||
self.update()
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
function update () {
|
||||
|
|
|
@ -14,7 +14,7 @@ class Store {
|
|||
this.timer = setInterval(() => {
|
||||
this.lastUpdate = Date.now()
|
||||
this.light = true
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
stop = () => clearInterval(this.timer)
|
||||
|
|
Loading…
Reference in a new issue