mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-14 21:09:50 +02:00
fix checkout if branch already exist
This commit is contained in:
@@ -135,6 +135,10 @@ export const merge = function (otherBranch) {
|
||||
|
||||
export const checkout = function (branch) {
|
||||
log.debug('in checkout');
|
||||
if (!branches[branch]) {
|
||||
branches[branch] = head != null ? head.id : null;
|
||||
log.debug('in createBranch');
|
||||
}
|
||||
curBranch = branch;
|
||||
const id = branches[curBranch];
|
||||
head = commits[id];
|
||||
|
Reference in New Issue
Block a user