Menu

When null is not a default: hiding the Pages live block without a deployment
📰

When null is not a default: hiding the Pages live block without a deployment

DEV Community: vue·Priyanshu Jha·3 days ago
#L3ITJzo7
#devtovue#devto#dev#deployment#block
Long article (731 words) — no AI summary yet.
Reading 0:00
15s threshold

TypeError: Cannot read properties of null (reading 'active') is not a helpful way for Deploy > Pages to tell you that a project has no live site. It is what the live block did, though, once the only primary deployment had been stopped. The query returned no active primary deployment. The parent passed null . The child read deployment.active anyway.

This is the story of gitlab-org/gitlab!274390 , a one-condition render fix, and a reminder that a Vue prop default is not a null guard.

The issue: a block that assumed a deployment existed

The issue was gitlab-org/gitlab#642598 , opened by Miguel Rincon. On Deploy > Pages , a project that still has Pages enabled but no active primary deployment — for example after its only deployment was stopped — blew up in the live block.

deployments.vue passed newestDeployment into live-block . That computed value is null when the query has no active primary deployment. live-block still rendered once loading finished, and it read deployment.active .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.