Skip to content

Commit 4044e7d

Browse files
committed
fixed bug that an error is thrown if no name is proided to add dialog
1 parent 813c17b commit 4044e7d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

client/src/app/dashboard/table-all/table-all.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ export class TableAllComponent implements OnInit {
135135
});
136136

137137
dialogRef.afterClosed().subscribe(dialogResult => {
138-
if (dialogResult === 'CancelAdd') {
138+
if (!dialogResult || dialogResult === 'CancelAdd') {
139139
dialogRef.close();
140140
} else {
141-
console.log('dialogResult', dialogResult);
142141
this.apiService.postInstance(this.type, dialogResult.name).subscribe((result: Instance) => {
143142
this.dataSource.data.push(result);
144143
}, err => {

0 commit comments

Comments
 (0)