Skip to content

Commit

Permalink
Don't create 2 instances of UserService (#437)
Browse files Browse the repository at this point in the history
dockstore/dockstore#1764

UserService is listed as a provider in app.module.ts. A second instance
of the UserService was getting loaded due to the 2 declarations, in
here and in app.module.ts, which led to odd behavior:

Logging in and out out would only update one of the instances of the
service, and then when the other instance came into play for some
components, that instances would still have a reference to the previous
user.
  • Loading branch information
coverbeck authored Aug 31, 2018
1 parent c9ab4f7 commit 0b0e3d9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/app/stargazers/stargazers.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { StargazersComponent } from './stargazers.component';
import { FlexLayoutModule } from '@angular/flex-layout';
import { StarentryService } from '../shared/starentry.service';
import { StarringService } from '../starring/starring.service';
import { UserService } from '../loginComponents/user.service';
@NgModule({
imports: [
CommonModule,
Expand All @@ -34,7 +33,6 @@ import { UserService } from '../loginComponents/user.service';
],
providers: [
StarringService,
UserService,
StarentryService
]
})
Expand Down

0 comments on commit 0b0e3d9

Please sign in to comment.