Skip to content

Commit 5dd94d0

Browse files
committed
Backport impress#1254: Handle undefined result
Refs: metarhia/impress#1254 Closes: #176 PR-URL: #180
1 parent 036a34e commit 5dd94d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Client {
112112
return;
113113
}
114114
const result = await proc.method(args);
115-
if (!session && proc.access === 'public') {
115+
if (!session && result && result.userId && proc.access === 'public') {
116116
session = application.auth.start(this, result.userId);
117117
result.token = session.token;
118118
}

0 commit comments

Comments
 (0)