git ssb

10+

Matt McKegg / patchwork



Commit 7c4391f01e7cb30eb0441c981dddfc1678c0546b

don't freak out if some progress api is missing

Dominic Tarr committed on 5/20/2017, 11:11:36 PM
Parent: b3706f3f8cd9059bc82b3db294c8b4a4fdfe6424

Files changed

modules/feed/pull/private.jschanged
modules/page/html/render/public.jschanged
modules/progress/obs.jschanged
modules/feed/pull/private.jsView
@@ -21,9 +21,9 @@
2121 delete opts.lt
2222 }
2323
2424 return StreamWhenConnected(api.sbot.obs.connection, (sbot) => {
25- return (sbot.private.read || pull.empty)(opts)
25+ return (sbot.private && sbot.private.read || pull.empty)(opts)
2626 })
2727 })
2828 }
2929
modules/page/html/render/public.jsView
@@ -200,9 +200,10 @@
200200 h('div.main', [
201201 h('div.name', [ api.about.obs.name(id) ])
202202 ]),
203203 h('div.progress', [
204- api.progress.html.peer(id)
204+//PROGRESS. this is where replication progress is shown?
205+// api.progress.html.peer(id)
205206 ])
206207 ])
207208 })
208209 ])
modules/progress/obs.jsView
@@ -64,9 +64,15 @@
6464 })
6565
6666 watch(api.sbot.obs.connection, (sbot) => {
6767 if (sbot) {
68- var source = keyFn(sbot)
68+ var source
69+ try {
70+ source = keyFn(sbot)
71+ } catch (err) {
72+ progress.set(err)
73+ return progress
74+ }
6975 if (source) {
7076 pull(
7177 source(),
7278 pull.drain((event) => {
@@ -79,4 +85,5 @@
7985
8086 return progress
8187 }
8288 }
89+

Built with git-ssb-web