diff --git a/packages/mermaid/src/diagrams/sequence/parser/sequenceDiagram.jison b/packages/mermaid/src/diagrams/sequence/parser/sequenceDiagram.jison index 17be25a7a..5a6599ef5 100644 --- a/packages/mermaid/src/diagrams/sequence/parser/sequenceDiagram.jison +++ b/packages/mermaid/src/diagrams/sequence/parser/sequenceDiagram.jison @@ -138,8 +138,8 @@ statement | autonumber NUM 'NEWLINE' { $$ = {type:'sequenceIndex',sequenceIndex: Number($2), sequenceIndexStep:1, sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER};} | autonumber off 'NEWLINE' { $$ = {type:'sequenceIndex', sequenceVisible:false, signalType:yy.LINETYPE.AUTONUMBER};} | autonumber 'NEWLINE' {$$ = {type:'sequenceIndex', sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER}; } - | 'activate' actor 'NEWLINE' {$$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $2};} - | 'deactivate' actor 'NEWLINE' {$$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $2};} + | 'activate' actor 'NEWLINE' {$$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $2.actor};} + | 'deactivate' actor 'NEWLINE' {$$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $2.actor};} | note_statement 'NEWLINE' | links_statement 'NEWLINE' | link_statement 'NEWLINE' @@ -288,11 +288,11 @@ placement signal : actor signaltype '+' actor text2 { $$ = [$1,$4,{type: 'addMessage', from:$1.actor, to:$4.actor, signalType:$2, msg:$5, activate: true}, - {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $4} + {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $4.actor} ]} | actor signaltype '-' actor text2 { $$ = [$1,$4,{type: 'addMessage', from:$1.actor, to:$4.actor, signalType:$2, msg:$5}, - {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $1} + {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $1.actor} ]} | actor signaltype actor text2 { $$ = [$1,$3,{type: 'addMessage', from:$1.actor, to:$3.actor, signalType:$2, msg:$4}]} diff --git a/packages/mermaid/src/diagrams/sequence/sequenceDb.ts b/packages/mermaid/src/diagrams/sequence/sequenceDb.ts index 5a0916729..9f1ea443f 100644 --- a/packages/mermaid/src/diagrams/sequence/sequenceDb.ts +++ b/packages/mermaid/src/diagrams/sequence/sequenceDb.ts @@ -513,10 +513,10 @@ export const apply = function (param: any | AddMessageParams | AddMessageParams[ state.records.destroyedActors[param.actor] = state.records.messages.length; break; case 'activeStart': - addSignal(param.actor.actor, undefined, undefined, param.signalType); + addSignal(param.actor, undefined, undefined, param.signalType); break; case 'activeEnd': - addSignal(param.actor.actor, undefined, undefined, param.signalType); + addSignal(param.actor, undefined, undefined, param.signalType); break; case 'addNote': addNote(param.actor, param.placement, param.text);