File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,7 @@ Account account({
313313 ackedPushToken: ackedPushToken,
314314 );
315315}
316+ const _account = account;
316317
317318/// A [User] which throws on attempting to mutate any of its fields.
318319///
@@ -1285,10 +1286,13 @@ const _initialSnapshot = initialSnapshot;
12851286
12861287PerAccountStore store ({
12871288 GlobalStore ? globalStore,
1289+ User ? selfUser,
12881290 Account ? account,
12891291 InitialSnapshot ? initialSnapshot,
12901292}) {
1291- final effectiveAccount = account ?? selfAccount;
1293+ assert (! (account != null && selfUser != null ));
1294+ final effectiveAccount = account
1295+ ?? (selfUser != null ? _account (user: selfUser) : selfAccount);
12921296 return PerAccountStore .fromInitialSnapshot (
12931297 globalStore: globalStore ?? _globalStore (accounts: [effectiveAccount]),
12941298 accountId: effectiveAccount.id,
You can’t perform that action at this time.
0 commit comments