Skip to content

Commit

Permalink
Change to only use the variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Wareing committed Dec 22, 2023
1 parent 3e08c0a commit 8c94a9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/FigmaExport/Loaders/JSONColorsLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ final class JSONColorsLoader {

static func processSchemeColors(in node: Any, path: [String] = []) -> [Color] {
// Check if the node contains a color value
if let color = node as? [String: String], let value = color["value"] {
let name = path.joined(separator: "_")
if let color = node as? [String: String], let value = color["value"], let name = path.last {
if let def = Color(name: name, value: value) {
return [def]
} else {
Expand Down

0 comments on commit 8c94a9d

Please sign in to comment.