Skip to content

Commit

Permalink
Initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
sourishkrout committed Apr 16, 2024
1 parent cf7fe77 commit 5a85bd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/document/editor/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ func Serialize(notebook *Notebook, outputMetadata *document.RunmeMetadata) ([]by
}

var raw []byte
if outputMetadata != nil {
if outputMetadata != nil && outputMetadata.Session.GetID() != "" {
if frontmatter == nil {
frontmatter = document.NewYAMLFrontmatter()
frontmatter.Runme = &document.RunmeMetadata{}
}
frontmatter.Runme.Session = outputMetadata.Session
frontmatter.Runme.Session.Updated = prettyTime(time.Now())
Expand Down

0 comments on commit 5a85bd3

Please sign in to comment.