Commit 72c0daa
authored
Update no-then.md
The 'improved code' after linting was unnecessarily complex introducing a named variable across multiple lines for no reason which made it look better to keep using `then`. A bit surprising.
Previous catch example was code which didn't differentiate between failing case (which is now a deliberate null) and undefined case (which is often the result of an error).1 parent e77f49c commit 72c0daa
1 file changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
25 | 40 | | |
26 | 41 | | |
27 | | - | |
28 | 42 | | |
29 | | - | |
| 43 | + | |
30 | 44 | | |
31 | | - | |
32 | | - | |
| 45 | + | |
| 46 | + | |
33 | 47 | | |
34 | | - | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
| |||
0 commit comments