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- } ;
51export class ResultError extends Error {
6- isHtml : boolean ;
72 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- }
133}
144export class TodoError extends ResultError {
155 override name = "TodoError" ;
Original file line number Diff line number Diff line change @@ -296,9 +296,8 @@ function main() {
296296 break ;
297297 }
298298 for ( const item of errors ) {
299- const property = item . isHtml ? "innerHTML" : "innerText" ;
300299 const list = document . createElement ( "li" ) ;
301- list [ property ] = item . message ;
300+ list . innerText = item . message ;
302301 errorList . appendChild ( list ) ;
303302 }
304303 }
You can’t perform that action at this time.
0 commit comments