diff --git a/dev-packages/size-limit-gh-action/index.mjs b/dev-packages/size-limit-gh-action/index.mjs index 43f4f3a96f65..7ff44e0dd8a6 100644 --- a/dev-packages/size-limit-gh-action/index.mjs +++ b/dev-packages/size-limit-gh-action/index.mjs @@ -187,7 +187,7 @@ async function run() { const githubToken = getInput('github_token'); const threshold = getInput('threshold'); - if (!comparisonBranch && !pr) { + if (comparisonBranch && !pr) { throw new Error('No PR found. Only pull_request workflows are supported.'); }