Skip to content

Commit c7194c9

Browse files
ArthurSensroboquat
authored andcommitted
Properly handle undefined analytics
Signed-off-by: ArthurSens <[email protected]>
1 parent 31f7e9b commit c7194c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.werft/jobs/build/deploy-to-preview-environment.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,10 @@ async function deployToDevWithInstaller(werft: Werft, jobConfig: JobConfig, depl
272272

273273
let analytics: Analytics
274274
if ((deploymentConfig.analytics || "").startsWith("segment|")) {
275-
analytics.type = "segment"
276-
analytics.token = deploymentConfig.analytics!.substring("segment|".length)
275+
analytics = {
276+
type: "segment",
277+
token: deploymentConfig.analytics!.substring("segment|".length)
278+
}
277279
}
278280

279281
const installer = new Installer({

0 commit comments

Comments
 (0)