Fixed undefined name issue.

This commit is contained in:
Mandlik, Nikhil K. (ARC-TI)[KBR Wyle Services, LLC]
2021-05-28 11:35:46 -07:00
parent 354b590852
commit d27d4aba16
2 changed files with 4 additions and 8 deletions

View File

@@ -51,12 +51,7 @@ export default class CreateWizard {
});
}
addTitle(sections, includeLocation) {
let value = `${this.domainObject.name || this.type.definition.name}`;;
if (includeLocation) {
value = `Unnamed ${value}`;
}
addTitle(sections) {
const row = {
control: 'textfield',
cssClass: 'l-input-lg',
@@ -64,7 +59,7 @@ export default class CreateWizard {
name: 'Title',
pattern: '\S+',
required: true,
value
value: this.domainObject.name
};
sections.forEach(section => {
@@ -101,7 +96,7 @@ export default class CreateWizard {
});
this.addNotes(sections);
this.addTitle(sections, includeLocation);
this.addTitle(sections);
// Ensure there is always a 'save in' section
if (includeLocation) {

View File

@@ -116,6 +116,7 @@ export default class CreateAction extends PropertiesAction {
const typeDefinition = this.openmct.types.get(type);
const definition = typeDefinition.definition;
const domainObject = {
name: `Unnamed ${this.type.definition.name}`,
type,
identifier: {
key: uuid(),