@@ -30,25 +30,18 @@ const matchByPath = (a: any, b: any) => a.path === b.path;
30
30
31
31
export const updateReplOutput = async ( store : ReplStore , result : ReplResult ) => {
32
32
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 ;
36
42
}
37
43
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' ;
53
46
}
54
47
} ;
0 commit comments