Skip to content

Commit

Permalink
Account for partial init
Browse files Browse the repository at this point in the history
  • Loading branch information
sourishkrout committed Apr 16, 2024
1 parent 5a85bd3 commit d09f03e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/document/editor/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func Serialize(notebook *Notebook, outputMetadata *document.RunmeMetadata) ([]by
if outputMetadata != nil && outputMetadata.Session.GetID() != "" {
if frontmatter == nil {
frontmatter = document.NewYAMLFrontmatter()
}
if frontmatter.Runme == nil {
frontmatter.Runme = &document.RunmeMetadata{}
}
frontmatter.Runme.Session = outputMetadata.Session
Expand Down

0 comments on commit d09f03e

Please sign in to comment.