5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-05 03:42:22 +08:00

Throw fatal error if application.New called twice.

This commit is contained in:
Lea Anthony 2025-03-24 17:20:31 +11:00
parent e874222a83
commit a393d1f4da
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
2 changed files with 2 additions and 1 deletions

View File

@ -140,6 +140,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Built-in service types are now consistently called `Service` by [@fbbdev](https://github.com/fbbdev) in [#4067](https://github.com/wailsapp/wails/pull/4067) - Built-in service types are now consistently called `Service` by [@fbbdev](https://github.com/fbbdev) in [#4067](https://github.com/wailsapp/wails/pull/4067)
- Built-in service creation functions with options are now consistently called `NewWithConfig` by [@fbbdev](https://github.com/fbbdev) in [#4067](https://github.com/wailsapp/wails/pull/4067) - Built-in service creation functions with options are now consistently called `NewWithConfig` by [@fbbdev](https://github.com/fbbdev) in [#4067](https://github.com/wailsapp/wails/pull/4067)
- `Select` method on `sqlite` service is now named `Query` for consistency with Go APIs by [@fbbdev](https://github.com/fbbdev) in [#4067](https://github.com/wailsapp/wails/pull/4067) - `Select` method on `sqlite` service is now named `Query` for consistency with Go APIs by [@fbbdev](https://github.com/fbbdev) in [#4067](https://github.com/wailsapp/wails/pull/4067)
- Calling `application.New` more than once will result in a fatal error by [@leaanthony](https://github.com/leaanthony)
## v3.0.0-alpha.9 - 2025-01-13 ## v3.0.0-alpha.9 - 2025-01-13

View File

@ -54,7 +54,7 @@ func Get() *App {
func New(appOptions Options) *App { func New(appOptions Options) *App {
if globalApplication != nil { if globalApplication != nil {
return globalApplication globalApplication.fatal("application already created. You cannot create more than one application")
} }
mergeApplicationDefaults(&appOptions) mergeApplicationDefaults(&appOptions)