Skip to content

Commit a79076f

Browse files
authored
Update README.md
Must pass parameters to the conditional function or it might cause variable pollution. 692 add fsm, listNode arguments 696 add fsmInstance, listNodeInstance parameters
1 parent b5c7100 commit a79076f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -689,11 +689,11 @@ if (fsm.state === 'fetching' && isEmpty(listNode)) {
689689

690690
**Good**:
691691
```javascript
692-
function shouldShowSpinner() {
692+
function shouldShowSpinner(fsm, listNode) {
693693
return fsm.state === 'fetching' && isEmpty(listNode);
694694
}
695695

696-
if (shouldShowSpinner()) {
696+
if (shouldShowSpinner(fsmInstance, listNodeInstance)) {
697697
// ...
698698
}
699699
```

0 commit comments

Comments
 (0)