diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a16ad22..886fd46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -54,8 +54,8 @@ jobs: - name: Publish to npm run: npm publish - - name: Push commit and tag - run: git push origin main --follow-tags + - name: Push tag + run: git push origin v${{ inputs.version }} - name: Create GitHub Release run: gh release create v${{ inputs.version }} --title "v${{ inputs.version }}" --generate-notes diff --git a/src/index.ts b/src/index.ts index b463ddb..4509b47 100644 --- a/src/index.ts +++ b/src/index.ts @@ -423,10 +423,11 @@ export function ecij({ // Ensure JS modules with CSS extractions are included, // otherwise they may be tree-shaken away if // all their exports are evaluated away - if (parsedFileInfoCache.has(id)) { - if (parsedFileInfoCache.get(id)!.declarations.length !== 0) { - return id; - } + if ( + parsedFileInfoCache.has(id) && + parsedFileInfoCache.get(id)!.declarations.length !== 0 + ) { + return id; } return null;