Skip to content

Commit

Permalink
fixing error "doc is null"
Browse files Browse the repository at this point in the history
  • Loading branch information
suculent committed Jan 26, 2023
1 parent 59b1304 commit 29fbfac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion design/design_devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"map": "function (doc) { if(doc.mac) { emit (doc.mac, doc); } }"
},
"devices_by_owner": {
"map": "function (doc) { emit (doc.owner, doc); }"
"map": "function (doc) { if (doc && doc.owner) { emit (doc.owner, doc); } }"
},
"devices_by_source": {
"map": "function (doc) { if(doc.source) { emit (doc.source, doc); } }"
Expand Down

0 comments on commit 29fbfac

Please sign in to comment.