Skip to content

Commit d4f4cde

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

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default class ExtractionCompiler implements Disposable {
1515
}
1616
) {
1717
this.manager = new CatalogManager(config, opts);
18+
this[Symbol.dispose] = this[Symbol.dispose].bind(this);
1819
this.installExitHandlers();
1920
}
2021

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)