Fix error

This commit is contained in:
Joseph Schorr 2016-05-12 16:54:05 -04:00
parent 2d4916c6ec
commit 2274d6ff84

View file

@ -23,7 +23,9 @@ angular.module('quay').directive('credentialsDialog', function () {
$scope.docker = {};
$scope.$on('$destroy', function() {
document.body.removeChild($element[0]);
if ($scope.inBody) {
document.body.removeChild($element[0]);
}
});
// Generate a unique ID for the dialog.
@ -43,6 +45,7 @@ angular.module('quay').directive('credentialsDialog', function () {
// Move the dialog to the body to prevent it from being affected
// by being placed inside other tables.
$scope.inBody = true;
document.body.appendChild($element[0]);
};