Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit cb4e06f

Browse files
LukeWoodwardbell
authored andcommitted
Compile Time TypeError Fix (#155)
Looks like during a refactor the return type for http.get in getHero was messed up - this fixes it.
1 parent a824a6e commit cb4e06f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/http-client-hero.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class HttpClientHeroService extends HeroService {
2929
// This get-by-id will 404 when id not found
3030
getHero(id: number): Observable<Hero> {
3131
const url = `${this.heroesUrl}/${id}`;
32-
return this.http.get<Hero[]>(url)
32+
return this.http.get<Hero>(url)
3333
.catch(this.handleError);
3434
}
3535

0 commit comments

Comments
 (0)