Skip to content

Commit

Permalink
fix(render): supply default 'html' format if none exists
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Apr 5, 2019
1 parent 26d90b5 commit 2b82b41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func init() {
// MaybeAddDefaultViz sets a dataset viz component and template if none exists
func MaybeAddDefaultViz(ds *dataset.Dataset) {
if ds.Viz != nil {
// ensure viz defaults to HTML if unspecified
if ds.Viz.Format == "" {
ds.Viz.Format = "html"
}
return
}
ds.Viz = &dataset.Viz{Format: "html"}
Expand Down

0 comments on commit 2b82b41

Please sign in to comment.