File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change 1
- export type ResultErrorOptions = {
2
- cause : unknown ;
3
- isHtml : boolean ;
4
- } ;
5
1
export class ResultError extends Error {
6
- isHtml : boolean ;
7
2
override name = "ArrayResultError" ;
8
- constructor ( message : string , options : Partial < ResultErrorOptions > = { } ) {
9
- const { cause, isHtml = false } = options ;
10
- super ( message , { cause } ) ;
11
- this . isHtml = isHtml ;
12
- }
13
3
}
14
4
export class TodoError extends ResultError {
15
5
override name = "TodoError" ;
Original file line number Diff line number Diff line change @@ -296,9 +296,8 @@ function main() {
296
296
break ;
297
297
}
298
298
for ( const item of errors ) {
299
- const property = item . isHtml ? "innerHTML" : "innerText" ;
300
299
const list = document . createElement ( "li" ) ;
301
- list [ property ] = item . message ;
300
+ list . innerText = item . message ;
302
301
errorList . appendChild ( list ) ;
303
302
}
304
303
}
You can’t perform that action at this time.
0 commit comments