diff --git a/docs/_worker.js b/docs/_worker.js index 333f6268c7..1fd06049d0 100644 --- a/docs/_worker.js +++ b/docs/_worker.js @@ -55,11 +55,14 @@ async function versionWarning(request, env) { ` } + const branch = env.CF_PAGES_BRANCH + const diff_html_url = `https://github.com/pydantic/pydantic-ai/compare/${tag_name}...${branch}` return `
Version Notice
- ${env.CF_PAGES_BRANCH === 'main' ? '' : `(${env.CF_PAGES_BRANCH} preview)`} - This documentation is ahead of the last release by ${ahead_by} commit${ahead_by === 1 ? '' : 's'}. + ${branch === 'main' ? '' : `(${branch} preview)`} + This documentation is ahead of the last release by + ${ahead_by} commit${ahead_by === 1 ? '' : 's'}. You may see documentation for features not yet supported in the latest release ${name}.