mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(checkbox): server-side rendering error when checking textContent (#5470)
Adds an extra null check when trimming the checkbox `textContent`. This avoids issues in Universal where the `textContent` will be undefined. Fixes #5453.
This commit is contained in:
committed by
Andrew Seguin
parent
41c804b36a
commit
0314bd8025
@@ -1,6 +1,6 @@
|
||||
<label [attr.for]="inputId" class="mat-checkbox-layout" #label>
|
||||
<div class="mat-checkbox-inner-container"
|
||||
[class.mat-checkbox-inner-container-no-side-margin]="!checkboxLabel.textContent.trim()">
|
||||
[class.mat-checkbox-inner-container-no-side-margin]="!checkboxLabel.textContent || !checkboxLabel.textContent.trim()">
|
||||
<input #input
|
||||
class="mat-checkbox-input cdk-visually-hidden" type="checkbox"
|
||||
[id]="inputId"
|
||||
|
||||
Reference in New Issue
Block a user