Skip to content

Commit 2b0b3fc

Browse files
committed
fix: thanks cursor
1 parent 919a0e3 commit 2b0b3fc

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

packages/next-intl/src/extractor/ExtractionCompiler.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

packages/next-intl/src/plugin/extractor/extractionLoader.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)