Skip to content

Commit aef61eb

Browse files
electric-drummerjelbourn
authored andcommitted
fix(platform): wrap MSStream property detection as string to prevent Closure property renaming (#13117)
Prevents potential name collisions on window object, due to Closure compiler property renaming, that result in incorrect detection of iOS and cause tooltips to show on tap. Fixes #12223
1 parent 7d586e4 commit aef61eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdk/platform/platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class Platform {
4848

4949
/** Whether the current platform is Apple iOS. */
5050
IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&
51-
!(window as any).MSStream;
51+
!('MSStream' in window);
5252

5353
/** Whether the current browser is Firefox. */
5454
// It's difficult to detect the plain Gecko engine, because most of the browsers identify

0 commit comments

Comments
 (0)