Fix error
This commit is contained in:
parent
2d4916c6ec
commit
2274d6ff84
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,9 @@ angular.module('quay').directive('credentialsDialog', function () {
|
||||||
$scope.docker = {};
|
$scope.docker = {};
|
||||||
|
|
||||||
$scope.$on('$destroy', function() {
|
$scope.$on('$destroy', function() {
|
||||||
document.body.removeChild($element[0]);
|
if ($scope.inBody) {
|
||||||
|
document.body.removeChild($element[0]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Generate a unique ID for the dialog.
|
// 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
|
// Move the dialog to the body to prevent it from being affected
|
||||||
// by being placed inside other tables.
|
// by being placed inside other tables.
|
||||||
|
$scope.inBody = true;
|
||||||
document.body.appendChild($element[0]);
|
document.body.appendChild($element[0]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue