mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
Feature: Don't generate models.ts if there are no models.
This commit is contained in:
parent
f192cbd01b
commit
eb97f53124
1 changed files with 5 additions and 0 deletions
|
|
@ -109,6 +109,11 @@ func (b *Bindings) WriteModels(modelsDir string) error {
|
|||
modelsData.WriteString("\n}\n\n")
|
||||
}
|
||||
|
||||
// Don't write if we don't have anything
|
||||
if len(modelsData.Bytes()) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
filename := filepath.Join(modelsDir, "models.ts")
|
||||
err := os.WriteFile(filename, modelsData.Bytes(), 0755)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue