We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a929d9c commit 6274f17Copy full SHA for 6274f17
packages/protocol/src/browser/modules/fs.ts
@@ -98,9 +98,7 @@ export class FsModule {
98
}
99
100
public exists = (path: fs.PathLike, callback: (exists: boolean) => void): void => {
101
- callbackify(this.proxy.exists)(path, (exists) => {
102
- callback!(exists as any);
103
- });
+ this.proxy.exists(path).then((exists) => callback(exists)).catch(() => callback(false));
104
105
106
public fchmod = (fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void => {
0 commit comments