diff --git a/src/cdk/drag-drop/directives/drag.ts b/src/cdk/drag-drop/directives/drag.ts index 65539796ed5e..a494509a0001 100644 --- a/src/cdk/drag-drop/directives/drag.ts +++ b/src/cdk/drag-drop/directives/drag.ts @@ -370,16 +370,7 @@ export class CdkDrag implements AfterViewInit, OnChanges, OnDestroy { return this.element.nativeElement.closest(boundary); } - const element = coerceElement(boundary); - - if ( - (typeof ngDevMode === 'undefined' || ngDevMode) && - !element.contains(this.element.nativeElement) - ) { - throw Error('Draggable element is not inside of the node passed into cdkDragBoundary.'); - } - - return element; + return coerceElement(boundary); } /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */