d2js: updating custom font error code
This commit is contained in:
parent
940aef38ea
commit
17e5081047
1 changed files with 1 additions and 1 deletions
|
|
@ -212,7 +212,7 @@ func Compile(args []js.Value) (interface{}, error) {
|
|||
if fontRegular != nil || fontItalic != nil || fontBold != nil || fontSemibold != nil {
|
||||
fontFamily, err := d2fonts.AddFontFamily("custom", fontRegular, fontItalic, fontBold, fontSemibold)
|
||||
if err != nil {
|
||||
return nil, &WASMError{Message: fmt.Sprintf("custom fonts could not be initialized: %s", err.Error()), Code: 500}
|
||||
return nil, &WASMError{Message: fmt.Sprintf("custom fonts could not be initialized: %s", err.Error()), Code: 400}
|
||||
}
|
||||
compileOpts.FontFamily = fontFamily
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue