Skip to content

Commit af94cf1

Browse files
authored
Posts/Users pages are blank when user not logged in (#560)
* fix: metadata fails when user not logged in this additional checks makes sure verification / node.deso.org metadata is only requested if loggedInUserPublicKey is ok. Currently it requests metadata from `https://node.deso.org/api/v0/get-user-metadata/undefined` which returns status 404 error and prevents post/user pages from showing the content. * align with diamondapp use same approach as DiamondApp
1 parent b1fc377 commit af94cf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class AppComponent implements OnInit {
114114

115115
return zip(
116116
this.backendApi.GetUsersStateless(this.globalVars.localNode, [loggedInUserPublicKey], false),
117-
environment.verificationEndpointHostname
117+
environment.verificationEndpointHostname && !_.isNil(loggedInUserPublicKey)
118118
? this.backendApi.GetUserMetadata(environment.verificationEndpointHostname, loggedInUserPublicKey).pipe(
119119
catchError((err) => {
120120
console.error(err);

0 commit comments

Comments
 (0)