Browse Source

Merge pull request #1515 from onevcat/fix/swiftui-build-xcode11

Fix SwiftUI build for Xcode 11
Wei Wang 5 years ago
parent
commit
28df519065
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Sources/SwiftUI/KFImage.swift

+ 2 - 2
Sources/SwiftUI/KFImage.swift

@@ -101,7 +101,7 @@ public struct KFImage: SwiftUI.View {
                     }
                 }
                 .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
-                .onAppear { [weak binder] in
+                .onAppear { [weak binder = self.binder] in
                     guard let binder = binder else {
                         return
                     }
@@ -109,7 +109,7 @@ public struct KFImage: SwiftUI.View {
                         binder.start()
                     }
                 }
-                .onDisappear { [weak binder] in
+                .onDisappear { [weak binder = self.binder] in
                     guard let binder = binder else {
                         return
                     }