fix a bug I introduced by not preserving the base case of 'getAuthorId'

pull/1/head
ansuz 3 years ago
parent 68efd54917
commit dd8f70d6f4

@ -252,10 +252,12 @@ define([
funcs.getAuthorId = function(authors, curve, tokenId) {
var existing = Object.keys(authors || {}).map(Number);
var uid;
if (!funcs.isLoggedIn()) {
var loggedIn = funcs.isLoggedIn();
if (!loggedIn && !tokenId) { return authorUid(existing); }
if (!loggedIn) {
existing.some(function (id) {
var author = authors[id] || {};
if (author.uid !== tokenId) { return; }
var author = authors[id];
if (!author || author.uid !== tokenId) { return; }
uid = Number(id);
return true;
});

Loading…
Cancel
Save