@@ -24,7 +24,7 @@ import {
24
24
StoryStep
25
25
} from "../model/story" ;
26
26
import { BotService } from "../bot-service" ;
27
- import { MatDialog } from "@angular/material/dialog" ;
27
+ import { MatDialog } from "@angular/material/dialog" ;
28
28
import { StateService } from "../../core-nlp/state.service" ;
29
29
import { ConfirmDialogComponent } from "../../shared-nlp/confirm-dialog/confirm-dialog.component" ;
30
30
import { StoryDialogComponent } from "./story-dialog.component" ;
@@ -160,7 +160,7 @@ export class StoryComponent implements OnInit, OnChanges {
160
160
if ( result && result . name ) {
161
161
this . story . storyId = result . name ;
162
162
this . story . name = result . label ;
163
- this . story . tags = [ result . tag ] ;
163
+ this . storyTag = result . tag ;
164
164
this . story . intent . name = result . intent ;
165
165
this . story . category = result . category ;
166
166
this . story . description = result . description ;
@@ -173,7 +173,7 @@ export class StoryComponent implements OnInit, OnChanges {
173
173
174
174
private saveStory ( selectStoryAfterSave : boolean ) {
175
175
this . story . steps = StoryStep . filterNew ( this . story . steps ) ;
176
- this . story . tags = [ this . storyTag ] ;
176
+ this . story . tags = ! this . storyTag || this . storyTag . length === 0 ? [ ] : [ this . storyTag ] ;
177
177
if ( this . story . _id ) {
178
178
this . bot . saveStory ( this . story ) . subscribe ( s => {
179
179
this . story . selected = selectStoryAfterSave ;
0 commit comments