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