Commit f826bdf13d9bbdfd31a38bfdff382106b8edfd52
Don't crash on missing message
cel committed on 5/15/2017, 7:24:25 PMParent: 24417ffb7f896971664053a13101154e40d6adce
Files changed
lib/serve.js | changed |
lib/serve.js | |||
---|---|---|---|
@@ -751,9 +751,10 @@ | |||
751 | 751 … | var self = this | |
752 | 752 … | if (self.query.raw != null) return self.rawId(id) | |
753 | 753 … | ||
754 | 754 … | this.app.getMsgDecrypted(id, function (err, rootMsg) { | |
755 | - if (err && err.name === 'NotFoundError') err = null, rootMsg = {key: id} | ||
755 … | + if (err && err.name === 'NotFoundError') err = null, rootMsg = { | ||
756 … | + key: id, value: {content: false}} | ||
756 | 757 … | if (err) return self.respond(500, err.stack || err) | |
757 | 758 … | var rootContent = rootMsg && rootMsg.value && rootMsg.value.content | |
758 | 759 … | var recps = rootContent && rootContent.recps | |
759 | 760 … | var threadRootId = rootContent && rootContent.root || id |
Built with git-ssb-web