Skip to content

Commit

Permalink
Async won't sync during initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Dec 22, 2024
1 parent 4eee287 commit 8224a4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mixins/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export function Async<const T extends typeof FileSystem>(FS: T): Mixin<T, AsyncM
(this as any)[key] = async (...args: unknown[]) => {
const result = await originalMethod.apply(this, args);

if (new Error().stack!.includes(`at async ${this.constructor.name}._next`)) return result;
if (new Error().stack!.includes(`at async ${this.constructor.name}._next`) || !this._isInitialized) return result;

try {
// @ts-expect-error 2556
Expand Down

0 comments on commit 8224a4e

Please sign in to comment.