Skip to content

Commit

Permalink
fix: update name of if let view extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gtokman committed May 2, 2021
1 parent 4810a05 commit f92a73c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Sources/ExtensionKit/SwiftUI/View.swift
Expand Up @@ -84,10 +84,9 @@ public extension View {
/// - modifier: Modifier to run on value if it exists
/// - Returns: Modified self if optional has a value
@ViewBuilder
func `ifLet`<TrueContent: View, Optional>(
_ value: Optional?,
_ modifier: (Self, Optional
) -> TrueContent) -> some View {
func `ifLet`<Content: View, Value>(
_ value: Value?,
_ modifier: (Self, Value) -> Content) -> some View {
if let value = value {
modifier(self, value)
} else {
Expand Down

0 comments on commit f92a73c

Please sign in to comment.