diff --git a/src/components/dialog/dialog.js b/src/components/dialog/dialog.js index d4562c46250..6949a49c1d1 100644 --- a/src/components/dialog/dialog.js +++ b/src/components/dialog/dialog.js @@ -342,7 +342,7 @@ function MdDialogProvider($$interimElementProvider) { return dialogPopIn( element, options.parent, - options.popInTarget.length && options.popInTarget + options.popInTarget && options.popInTarget.length && options.popInTarget ) .then(function() { if (options.escapeToClose) { @@ -399,7 +399,7 @@ function MdDialogProvider($$interimElementProvider) { return dialogPopOut( element, options.parent, - options.popInTarget.length && options.popInTarget + options.popInTarget && options.popInTarget.length && options.popInTarget ).then(function() { options.scope.$destroy(); element.remove();