Skip to content

Commit 1e7feae

Browse files
bukinoshitadependabot[bot]gabrielmfern
committed
fix(all): Use optional chain (#1820)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: gabriel miranda <[email protected]>
1 parent c998b0d commit 1e7feae

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/react-email/src/cli/utils/preview/start-dev-server.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,13 @@ export const startDevServer = async (
5757

5858
try {
5959
if (
60-
parsedUrl.path &&
61-
parsedUrl.path.includes('static/') &&
60+
parsedUrl.path?.includes('static/') &&
6261
!parsedUrl.path.includes('_next/static/')
6362
) {
6463
void serveStaticFile(res, parsedUrl, staticBaseDirRelativePath);
6564
} else if (!isNextReady) {
66-
void nextReadyPromise.then(() =>
67-
nextHandleRequest?.(req, res, parsedUrl),
65+
void nextReadyPromise.then(
66+
() => nextHandleRequest?.(req, res, parsedUrl),
6867
);
6968
} else {
7069
void nextHandleRequest?.(req, res, parsedUrl);

packages/tailwind/src/utils/css/resolve-all-css-variables.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ export const resolveAllCSSVariables = (root: Root) => {
3939
if (/--[^\s]+/.test(otherDecl.prop)) {
4040
const variable = `var(${otherDecl.prop})`;
4141
if (
42-
variablesUsed &&
43-
variablesUsed.includes(variable) &&
42+
variablesUsed?.includes(variable) &&
4443
doNodesMatch(decl.parent, otherDecl.parent)
4544
) {
4645
if (

0 commit comments

Comments
 (0)