Skip to content

Commit

Permalink
21 - DEMO6: ImageWorker makes it nice
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Sep 12, 2024
1 parent 63137de commit 2e9b621
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/components/pokemon-grid-item.gts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ export default class PokemonGridItem extends Component<PokemonSignature> {

@cached
get thumbnailUrl() {
return this.args.pokemon.image.thumbnail;
// const state = getPromiseState(this.thumbnailRequest);
// if (state.isError || state.isPending) {
// return null;
// }
// return state.result;
const state = getPromiseState(this.thumbnailRequest);
if (state.isError || state.isPending) {
return null;
}
return state.result;
}

<template>
Expand Down

0 comments on commit 2e9b621

Please sign in to comment.