Fix global registry bug

This commit is contained in:
loganhz 2019-06-04 16:52:22 +08:00
parent ecacce2f82
commit 88fd2b4dea
1 changed files with 2 additions and 2 deletions

View File

@ -28,9 +28,9 @@ export default Component.extend(ViewNewEdit, OptionallyNamespaced, {
if (get(this, 'model.type') === 'namespacedDockerCredential') {
set(this, 'scope', 'namespace');
}
const globalRegistryEnabled = get(this, 'globalStore').all('setting').findBy('id', 'global-registry-enabled')
const globalRegistryEnabled = get(this, 'globalStore').all('setting').findBy('id', 'global-registry-enabled') || {};
set(this, 'globalRegistryEnabled', globalRegistryEnabled)
set(this, 'globalRegistryEnabled', get(globalRegistryEnabled, 'value') === 'true')
let asArray = JSON.parse(JSON.stringify(get(this, 'model.asArray') || []))