Skip to content

Commit

Permalink
fix(all): Use optional chain (#1820)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
3 people authored Jan 16, 2025
1 parent db84d05 commit d11f478
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ export const startDevServer = async (

try {
if (
parsedUrl.path &&
parsedUrl.path.includes('static/') &&
parsedUrl.path?.includes('static/') &&
!parsedUrl.path.includes('_next/static/')
) {
void serveStaticFile(res, parsedUrl, staticBaseDirRelativePath);
} else if (!isNextReady) {
void nextReadyPromise.then(() =>
nextHandleRequest?.(req, res, parsedUrl),
void nextReadyPromise.then(
() => nextHandleRequest?.(req, res, parsedUrl),
);
} else {
void nextHandleRequest?.(req, res, parsedUrl);
Expand Down
3 changes: 1 addition & 2 deletions packages/tailwind/src/utils/css/resolve-all-css-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export const resolveAllCSSVariables = (root: Root) => {
if (/--[^\s]+/.test(otherDecl.prop)) {
const variable = `var(${otherDecl.prop})`;
if (
variablesUsed &&
variablesUsed.includes(variable) &&
variablesUsed?.includes(variable) &&
doNodesMatch(decl.parent, otherDecl.parent)
) {
if (
Expand Down

0 comments on commit d11f478

Please sign in to comment.