summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--users/app/models/identity.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/users/app/models/identity.rb b/users/app/models/identity.rb
index cbb540e..9b97b51 100644
--- a/users/app/models/identity.rb
+++ b/users/app/models/identity.rb
@@ -24,7 +24,9 @@ class Identity < CouchRest::Model::Base
if (doc.type != 'Identity') {
return;
}
- emit(doc.address, doc.keys["pgp"]);
+ if (typeof doc.keys === "object") {
+ emit(doc.address, doc.keys["pgp"]);
+ }
}
EOJS
view :disabled,