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:
parent
e874222a83
commit
a393d1f4da
@ -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
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user