Skip to content

Commit

Permalink
Use correct function to get value
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif committed Nov 7, 2023
1 parent 1c15ead commit 3ae3295
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Sources/AppState/Application+public.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
public extension Application {
// MARK: - Type Methods

/// Provides a description of the current application state
static var description: String {
let state = shared.cache.allValues
Expand Down Expand Up @@ -102,6 +104,8 @@ public extension Application {
shared.value(keyPath: keyPath)
}

// MARK: - Instance Methods

/**
Retrieves a dependency for the provided `id`. If dependency is not present, it is created once using the provided closure.

Expand Down
2 changes: 1 addition & 1 deletion Sources/AppState/Application.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class Application: ObservableObject {
func load<Value>(
dependency keyPath: KeyPath<Application, Dependency<Value>>
) {
_ = dependency(keyPath)
_ = value(keyPath: keyPath)
}

/// Loads the default dependencies for use in Application.
Expand Down

0 comments on commit 3ae3295

Please sign in to comment.