git ssb

10+

Matt McKegg / patchwork



Commit 0e0a093a37c300b42c555fadd15a899a1c917149

fix navigating to feeds

Matt McKegg committed on 4/20/2018, 11:34:54 AM
Parent: c04df255a162f470df63b251a7d6310b79215082

Files changed

main-window.jschanged
main-window.jsView
@@ -228,19 +228,17 @@
228228 }
229229
230230 function getExternalHandler (href, cb) {
231231 var link = ref.parseLink(href)
232- if (link) {
233- if (ref.isMsg(link.link)) {
234- api.sbot.async.get(link.link, function (err, value) {
235- if (err) return cb(err)
236- cb(null, api.app.sync.externalHandler({key: link.link, value, query: link.query}))
237- })
238- } else if (ref.isBlob(link.link)) {
239- cb(null, function (href) {
240- electron.shell.openExternal(api.blob.sync.url(href))
241- })
242- }
232+ if (link && ref.isMsg(link.link)) {
233+ api.sbot.async.get(link.link, function (err, value) {
234+ if (err) return cb(err)
235+ cb(null, api.app.sync.externalHandler({key: link.link, value, query: link.query}))
236+ })
237+ } else if (link && ref.isBlob(link.link)) {
238+ cb(null, function (href) {
239+ electron.shell.openExternal(api.blob.sync.url(href))
240+ })
243241 } else {
244242 cb()
245243 }
246244 }

Built with git-ssb-web