Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(dialog): prevent null-pointer error with popInTarget
Browse files Browse the repository at this point in the history
Closes #1061.
  • Loading branch information
ajoslin committed Jan 8, 2015
1 parent bc581e0 commit b36282a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit b36282a

Please sign in to comment.