This repository was archived by the owner on Dec 25, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -1972,23 +1972,25 @@ view.logs = {
1972
1972
" UTC"
1973
1973
) ;
1974
1974
} ;
1975
- const html =
1976
- logEntries . reduce ( function ( acc , logEntry ) {
1977
- return (
1978
- acc +
1979
- formatDateTime ( new Date ( logEntry . created_at ) ) +
1980
- " -- " +
1981
- logEntry . type . padEnd ( 7 ) +
1982
- " -- " +
1983
- logEntry . function +
1984
- " -- " +
1985
- logEntry . line +
1986
- " -- " +
1987
- logEntry . text +
1988
- "\n"
1989
- ) ;
1990
- } , "<pre>" ) + "</pre>" ;
1991
- $ ( ".logs_diagnostics_view" ) . html ( html ) ;
1975
+ const preformattedLog = logEntries . reduce ( function ( acc , logEntry ) {
1976
+ return (
1977
+ acc +
1978
+ formatDateTime ( new Date ( logEntry . created_at ) ) +
1979
+ " -- " +
1980
+ logEntry . type . padEnd ( 7 ) +
1981
+ " -- " +
1982
+ logEntry . function +
1983
+ " -- " +
1984
+ logEntry . line +
1985
+ " -- " +
1986
+ logEntry . text +
1987
+ "\n"
1988
+ ) ;
1989
+ } , "" ) ;
1990
+ /** @type {HTMLDivElement } */
1991
+ const logView = document . querySelector ( ".logs_diagnostics_view" ) ;
1992
+ logView . replaceChildren ( ) ;
1993
+ logView . appendChild ( document . createElement ( "pre" ) ) . textContent = preformattedLog ;
1992
1994
} ;
1993
1995
1994
1996
view . logs . clearContent ( ) ;
You can’t perform that action at this time.
0 commit comments