strictNullChecks (#4666)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo
2019-04-13 01:43:22 +09:00
committed by GitHub
parent 4ee40c3345
commit 987168b863
214 changed files with 939 additions and 785 deletions

View File

@@ -19,6 +19,7 @@ import config from '../../config';
import { Users, Notes, Emojis, UserProfiles } from '../../models';
import parseAcct from '../../misc/acct/parse';
import getNoteSummary from '../../misc/get-note-summary';
import { ensure } from '../../prelude/ensure';
const client = `${__dirname}/../../client/`;
@@ -149,11 +150,9 @@ router.get('/@:user', async (ctx, next) => {
usernameLower: username.toLowerCase(),
host
});
const profile = await UserProfiles.findOne({
userId: user.id
});
if (user != null) {
const profile = await UserProfiles.findOne(user.id).then(ensure);
const meta = await fetchMeta();
await ctx.render('user', {
user, profile,