File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ export default class ExtractionCompiler implements Disposable {
3131 }
3232
3333 private installExitHandlers ( ) {
34- const cleanup = this [ Symbol . dispose ] ;
34+ const cleanup = this [ Symbol . dispose ] . bind ( this ) ;
3535 process . on ( 'exit' , cleanup ) ;
3636 process . on ( 'SIGINT' , cleanup ) ;
3737 process . on ( 'SIGTERM' , cleanup ) ;
3838 }
3939
4040 private uninstallExitHandlers ( ) {
41- const cleanup = this [ Symbol . dispose ] ;
41+ const cleanup = this [ Symbol . dispose ] . bind ( this ) ;
4242 process . off ( 'exit' , cleanup ) ;
4343 process . off ( 'SIGINT' , cleanup ) ;
4444 process . off ( 'SIGTERM' , cleanup ) ;
Original file line number Diff line number Diff line change @@ -43,10 +43,13 @@ export default function extractionLoader(
4343 extractAllPromise = compiler . extractAll ( ) ;
4444 }
4545
46- extractor . extract ( this . resourcePath , source ) . then ( async ( result ) => {
47- if ( ! isDevelopment ) {
48- await extractAllPromise ;
49- }
50- callback ( null , result . code , result . map ) ;
51- } ) ;
46+ extractor
47+ . extract ( this . resourcePath , source )
48+ . then ( async ( result ) => {
49+ if ( ! isDevelopment ) {
50+ await extractAllPromise ;
51+ }
52+ callback ( null , result . code , result . map ) ;
53+ } )
54+ . catch ( callback ) ;
5255}
You can’t perform that action at this time.
0 commit comments