Commit 9e7fe24
committed
fix(material/core): fix mat-error not rendering with Closure Compiler (#28405)
* fix(material/core): fix mat-error not rendering with Closure Compiler
Fix Closure Compiler issue with mat-error. Fix issue where
mat-error does not render even when there is an error.
Existing behavior is that _ErrorStateTracker sometimes reports error
state as false when there is an error. This happens because Closure
Compiler renames the _ErrorStateTracker's ErrorStateMatcher. The
compiler renames all the other implementations of ErrorStateMatcher, but
they have different names. Causes the matcher to be null in
_ErrorStateTracker. Since ErrorStateMatcher is used as a class in some
situations, Closure Compiler is not aware that it is intended to be the
same type as the other implementations of ErrorStateMather.
Fix issue by declaring ErrorStateMatcher as an interface. When this
commit applied, mat-error will render when built with Closure
Compiler.
Googlers: see [internal issue report](b/316413299)
* !fixup fix(material/core): fix mat-error not rendering with Closure Compiler
(cherry picked from commit 6c49372)1 parent 556c8b9 commit 9e7fe24
File tree
2 files changed
+8
-8
lines changed- src/material/core/common-behaviors
- tools/public_api_guard/material
2 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
0 commit comments