cast isAuthenticated as a boolean to avoid side effects

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
This commit is contained in:
Dieter Sting 2021-09-24 09:59:19 +02:00 committed by GitHub
parent 7a03e65c3f
commit e4d443ed09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
'use strict';
module.exports = ({ ctx }) => {
return ctx.state.isAuthenticated;
return Boolean(ctx.state.isAuthenticated);
};