git ssb

3+

arj / patchbook



Commit 2dc0f2000ea26763376b01729bf194b42f37f963

Don't double images on some books, requires a patchfor for mutant

Anders Rune Jensen committed on 11/4/2017, 2:39:11 PM
Parent: 5536690d426af0f924c488a430680757ed70c82d

Files changed

book/obs/book.jschanged
book/obs/struct.jschanged
package.jsonchanged
book/obs/book.jsView
@@ -21,9 +21,9 @@
2121 book.authors.set(dbBook.common.authors)
2222 book.description.set(dbBook.common.description)
2323
2424 if (dbBook.common.image)
25- book.images.add(dbBook.common.image) // https://github.com/mmckegg/mutant/issues/20
25 + book.images.add(dbBook.common.image)
2626
2727 Object.keys(dbBook.subjective).forEach((k) => {
2828 if (book.subjective.has(k))
2929 {
book/obs/struct.jsView
@@ -1,6 +1,7 @@
11 const nest = require('depnest')
22 const { Value, Set, Dict, Struct, forEachPair } = require('mutant')
3 +const eq = require('deep-equal')
34
45 exports.needs = nest({
56 'sbot.async.publish': 'first'
67 })
@@ -13,9 +14,9 @@
1314 key: Value(''),
1415 title: Value(''),
1516 authors: Value(''),
1617 description: Value(''),
17- images: Set([]),
18 + images: Set([], { comparer: eq }),
1819 subjective: Dict()
1920 })
2021
2122 struct.create = function(cb)
package.jsonView
@@ -17,8 +17,9 @@
1717 "license": "Beerware",
1818 "dependencies": {
1919 "bulk-require": "^1.0.1",
2020 "depnest": "^1.3.0",
21 + "deep-equal": "^1.0.1",
2122 "html-escape": "^2.0.0",
2223 "mutant": "^3.21.2",
2324 "pull-scroll": "^1.0.9",
2425 "pull-stream": "^3.6.1",

Built with git-ssb-web