Skip to content

Fix DynamicLayoutComponent Initialization for Remote Environment Configurations and Remove Non-Null Assertion #23458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

SecTex
Copy link
Contributor

@SecTex SecTex commented Aug 6, 2025

Description

This pull request addresses an issue where applications that dynamically resolve their environment configuration via removeEnv encounter a runtime error: Cannot read properties of undefined (reading 'responseType'). It also removes a non-null assertion from inject(DynamicLayoutComponent, { optional: true, skipSelf: true }), due to it being optional.

  1. Replaces the OnInit lifecycle hook with an environment change listener.
  2. Ensures getLayout() is triggered only when the oAuthConfig is available and its responseType is code, preventing access to undefined properties
  3. Ensures getLayout() is triggered only when layout is not initialized, preventing re-initialization of the layout.

Checklist

  • I fully tested it as developer / designer and created unit / integration tests
  • I documented it (or no need to document or I will create a separate documentation issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant