Skip to content

Commit 2fbcebd

Browse files
MariovidoBridgeAR
authored andcommitted
[test-optimization] [SDTEST-2548] Fix playwright in v5 (#6343)
1 parent 5cc34e2 commit 2fbcebd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/datadog-instrumentations/src/playwright.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function getPlaywrightConfig (playwrightRunner) {
149149
}
150150

151151
function getRootDir (playwrightRunner, configArg) {
152-
const config = configArg ? configArg.config : getPlaywrightConfig(playwrightRunner)
152+
const config = configArg?.config || getPlaywrightConfig(playwrightRunner)
153153
if (config.rootDir) {
154154
return config.rootDir
155155
}
@@ -163,7 +163,7 @@ function getRootDir (playwrightRunner, configArg) {
163163
}
164164

165165
function getProjectsFromRunner (runner, configArg) {
166-
const config = configArg || getPlaywrightConfig(runner)
166+
const config = configArg?.projects ? configArg : getPlaywrightConfig(runner)
167167
return config.projects?.map((project) => {
168168
if (project.project) {
169169
return project.project

0 commit comments

Comments
 (0)