Skip to content

Commit cbba364

Browse files
committed
style: add workaround for periphery false positive
Related to issue peripheryapp/periphery#909 Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
1 parent 48b424b commit cbba364

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

DesignToolbox/DesignToolbox/Pages/Tokens/Dimension/Space/SpaceTokenCommonIllustration.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ struct SpaceIllustrationIcon: View {
216216
let asset: Asset?
217217

218218
var body: some View {
219-
if let asset {
219+
// NOTE: Periphery thinks "asset" is assigned but never used (false positive)
220+
// See issue https://github.com/peripheryapp/periphery/issues/909
221+
// Keep the "if let asset = asset" workaround and not "if let asset"
222+
if let asset = asset {
220223
Image(decorative: asset.imageName)
221224
.resizable()
222225
.renderingMode(.template)

0 commit comments

Comments
 (0)