Skip to content

Commit c052627

Browse files
authored
fix: allow empty userDataDir (#34730)
1 parent bd74fc4 commit c052627

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/playwright-core/src/client/browserType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class BrowserType extends ChannelOwner<channels.BrowserTypeChannel> imple
100100
ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),
101101
env: options.env ? envObjectToArray(options.env) : undefined,
102102
channel: options.channel,
103-
userDataDir: path.isAbsolute(userDataDir) ? userDataDir : path.resolve(userDataDir),
103+
userDataDir: (path.isAbsolute(userDataDir) || !userDataDir) ? userDataDir : path.resolve(userDataDir),
104104
};
105105
return await this._wrapApiCall(async () => {
106106
const result = await this._channel.launchPersistentContext(persistentParams);

0 commit comments

Comments
 (0)