Skip to content

Commit 0a82e21

Browse files
committed
prefer optional chaining
1 parent 3f06531 commit 0a82e21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/astro/src/integration/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ function getSourcemapsAssetsGlob(config: AstroConfig): string {
106106
// only copied over to <root>/.vercel. This seems to happen too late though.
107107
// So we glob on both of these directories.
108108
// Another case of "it ain't pretty but it works":(
109-
if (config.adapter && config.adapter.name?.startsWith('@astrojs/vercel')) {
109+
if (config.adapter?.name?.startsWith('@astrojs/vercel')) {
110110
return '{.vercel,dist}/**/*';
111111
}
112112

113113
// paths are stored as "file://" URLs
114114
const outDirPathname = config.outDir && path.resolve(config.outDir.pathname);
115-
const rootDirName = path.resolve((config.root && config.root.pathname) || process.cwd());
115+
const rootDirName = path.resolve(config.root?.pathname || process.cwd());
116116

117117
if (outDirPathname) {
118118
const relativePath = path.relative(rootDirName, outDirPathname);

0 commit comments

Comments
 (0)