@@ -30,25 +30,18 @@ const matchByPath = (a: any, b: any) => a.path === b.path;
3030
3131export const updateReplOutput = async ( store : ReplStore , result : ReplResult ) => {
3232 deepUpdate ( store . diagnostics , result . diagnostics ) ;
33- if ( store . htmlResult . rawHtml !== result . htmlResult . rawHtml ) {
34- store . htmlResult . rawHtml = result . htmlResult . rawHtml ;
35- store . htmlResult . prettyHtml = result . htmlResult . prettyHtml ;
33+ deepUpdate ( store . htmlResult , result . htmlResult ) ;
34+ deepUpdate ( store . transformedModules , result . transformedModules , matchByPath ) ;
35+ deepUpdate ( store . clientBundles , result . clientBundles , matchByPath ) ;
36+ deepUpdate ( store . ssrModules , result . ssrModules , matchByPath ) ;
37+ if (
38+ result . events . length !== store . events . length ||
39+ result . events . some ( ( ev , i ) => ev ?. start !== store . events [ i ] ?. start )
40+ ) {
41+ store . events = result . events ;
3642 }
3743
38- if ( result . diagnostics . length === 0 ) {
39- deepUpdate ( store . htmlResult , result . htmlResult ) ;
40- deepUpdate ( store . transformedModules , result . transformedModules , matchByPath ) ;
41- deepUpdate ( store . clientBundles , result . clientBundles , matchByPath ) ;
42- deepUpdate ( store . ssrModules , result . ssrModules , matchByPath ) ;
43- if (
44- result . events . length !== store . events . length ||
45- result . events . some ( ( ev , i ) => ev ?. start !== store . events [ i ] ?. start )
46- ) {
47- store . events = result . events ;
48- }
49-
50- if ( store . selectedOutputPanel === 'diagnostics' && store . monacoDiagnostics . length === 0 ) {
51- store . selectedOutputPanel = 'app' ;
52- }
44+ if ( store . selectedOutputPanel === 'diagnostics' && store . monacoDiagnostics . length === 0 ) {
45+ store . selectedOutputPanel = 'app' ;
5346 }
5447} ;
0 commit comments