git ssb

7+

dinoworm 🐛 / patchcore



Commit cb1f1a61cedf3da332ebbc02a61e371a8b04b4dd

check that item is still in cache before destroying

Matt McKegg committed on 6/28/2017, 9:16:46 AM
Parent: 4ff3dd24fadc8bffcd79936dec7a644eb40ef22d

Files changed

backlinks/obs.jschanged
backlinks/obs.jsView
@@ -23,10 +23,12 @@
2323 // an item will be removed from cache between 5 - 10 seconds after release
2424 // this ensures that the data is still available for a page reload
2525 var timer = setInterval(() => {
2626 oldRemove.forEach(id => {
27- cache[id].destroy()
28- delete cache[id]
27 + if (cache[id]) {
28 + cache[id].destroy()
29 + delete cache[id]
30 + }
2931 })
3032 oldRemove.clear()
3133
3234 // cycle

Built with git-ssb-web