diff --git a/domain/document/export.go b/domain/document/export.go index 1fb75cfe..ddee1271 100644 --- a/domain/document/export.go +++ b/domain/document/export.go @@ -45,16 +45,12 @@ func BuildExport(ctx domain.RequestContext, s domain.Store, spec exportSpec) (ht switch spec.FilterType { case "space": - content := strings.Builder{} - for _, spaceID := range spec.Data { t, c, e := exportSpace(ctx, s, spaceID) - if e != nil { - return "", err + if e == nil { + content.WriteString(c) + toc = append(toc, t...) } - - content.WriteString(c) - toc = append(toc, t...) } case "category": @@ -181,14 +177,14 @@ func exportDocument(ctx domain.RequestContext, s domain.Store, documentID string page.Numberize(p) // Put out document name. - b.WriteString("