We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d68a86c commit 0758880Copy full SHA for 0758880
js/utilities/galapagos.js
@@ -10,6 +10,10 @@ var db = new PouchDB(PouchDBUrl)
10
11
module.exports = exports = {
12
isEntity: function (e) {
13
+ // TODO check for userID, too. Or make the accounts regular.
14
+ if (e.userId) {
15
+ e.id = e.userId
16
+ }
17
if (e === null || typeof e !== 'object') throw new TypeError('Entity is not an object')
18
if (e !== null && !e.id) throw new Error('Entity does not have an id')
19
if (e !== null && typeof e.id !== 'string') throw new TypeError('Entity id is not a string')
0 commit comments