git ssb

0+

Piet / ssb-loomio



Commit e91df8e00ca174250db3f719cc4bbf9a3b54b07c

Uses lodash.clonedeep to avoid modifying schema.

Piet Geursen committed on 3/6/2018, 2:02:05 AM
Parent: 91884c77ace6b192aab48201e2d99e3ae110d162

Files changed

package-lock.jsonchanged
package.jsonchanged
poll/schema/chooseOnePoll.jschanged
package-lock.jsonView
@@ -302,8 +302,13 @@
302302 "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
303303 "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
304304 "dev": true
305305 },
306+ "lodash.clonedeep": {
307+ "version": "4.5.0",
308+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
309+ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8="
310+ },
306311 "lodash.merge": {
307312 "version": "4.6.1",
308313 "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz",
309314 "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ=="
package.jsonView
@@ -29,9 +29,9 @@
2929 },
3030 "dependencies": {
3131 "is-my-json-valid": "^2.17.1",
3232 "libnested": "^1.2.1",
33- "lodash.merge": "^4.6.1",
33+ "lodash.clonedeep": "^4.5.0",
3434 "ssb-msg-schemas": "^6.3.0",
3535 "ssb-ref": "^2.9.0"
3636 }
3737 }
poll/schema/chooseOnePoll.jsView
@@ -1,7 +1,8 @@
11 const pollSchema = require('./poll')
2+const cloneDeep = require('lodash.clonedeep')
23
3-const chooseOneSchema = Object.assign({}, pollSchema)
4+const chooseOneSchema = cloneDeep(pollSchema)
45
56 // collapse the details down to be ONLY chooseOne
67 chooseOneSchema.properties.pollDetails = { $ref: '#/definitions/pollDetails/chooseOne' }
78

Built with git-ssb-web