Commit f07b877
committed
Update logger example to account for
`event.detail` in the logger example could either be `CompilerErrorDetail` or `CompilerDiagnostic`, yet the example only handled the simpler (but deprecated) `CompilerErrorDetail`.
This adds a call to `primaryLocation` (if present) to account for the different structure of `CompilerDiagnostic` - `loc` is not present there.CompilerDiagnostic in CompilerError.details
1 parent a1ddcf5 commit f07b877
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
0 commit comments