Skip to content

Commit

Permalink
fix(cdk/drag-drop): resolve incompatibility with property minification (
Browse files Browse the repository at this point in the history
#28980)

Fixes that the `showPopover` call was being minified by Closure and preventing the popover from opening.
  • Loading branch information
crisbeto committed Apr 30, 2024
1 parent 32d2683 commit 58fa9b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cdk/drag-drop/preview-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ export class PreviewRef {
parent.appendChild(this._wrapper);

// The null check is necessary for browsers that don't support the popover API.
if (this._wrapper.showPopover) {
this._wrapper.showPopover();
// Note that we use a string access for compatibility with Closure.
if ('showPopover' in this._wrapper) {
this._wrapper['showPopover']();
}
}

Expand Down

0 comments on commit 58fa9b7

Please sign in to comment.