Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion common-content/en/module/legacy/fixing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ Fix your code!

On line 20 of `views/hashtag.mjs`, only fetch if the hashtag has changed.

The router passes the tag without a `#`, for example `trees`. `getBloomsByHashtag` stores `state.currentHashtag` with a `#`, for example `#trees`. Compare those two values in the same form. If you leave the `#` off one side, the check is always true and the requests never stop.

```js
if (hashtag !== state.currentHashtag) {
if (`#${hashtag}` !== state.currentHashtag) {
apiService.getBloomsByHashtag(hashtag);
}
```
Expand Down
Loading