Skip to content

Commit fe3e4c9

Browse files
committed
improve var name in rbac
1 parent 5c5508a commit fe3e4c9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal-packages/rbac/src/fallback.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,11 @@ class RoleBaseAccessFallbackController implements RoleBaseAccessController {
201201
}
202202

203203
if (env.type === "PREVIEW" || env.type === "DEVELOPMENT") {
204-
// The "default" sentinel is DEVELOPMENT-only: it maps to the dev root env
204+
// The "default" root branch is DEVELOPMENT-only: it maps to the dev root env
205205
// (which carries no branch), so we skip the pivot there. For PREVIEW,
206206
// "default" is an ordinary branch name and must still pivot to its child.
207-
const isDevRootSentinel = env.type === "DEVELOPMENT" && isDefaultDevBranch(branchName);
208-
if (branchName !== null && !isDevRootSentinel) {
207+
const isDevAndDefault = env.type === "DEVELOPMENT" && isDefaultDevBranch(branchName);
208+
if (branchName !== null && !isDevAndDefault) {
209209
const child = env.childEnvironments?.[0];
210210
if (!child) {
211211
return { ok: false, status: 401, error: "No matching branch env" };

0 commit comments

Comments
 (0)