@@ -40,28 +40,28 @@ extension FigmaExportCommand {
40
40
var nameValidateRegexp : String ?
41
41
var nameReplaceRegexp : String ?
42
42
43
- if let colorParams = commonParams? . colors {
44
- let loader = ColorsLoader (
43
+ if let variableParams = commonParams? . variablesColors {
44
+ let loader = ColorsVariablesLoader (
45
45
client: client,
46
46
figmaParams: figmaParams,
47
- colorParams : colorParams ,
47
+ variableParams : variableParams ,
48
48
filter: filter
49
49
)
50
50
colors = try loader. load ( )
51
-
52
- nameValidateRegexp = colorParams . nameValidateRegexp
53
- nameReplaceRegexp = colorParams . nameReplaceRegexp
54
- } else if let variableParams = commonParams ? . variablesColors {
55
- let loader = ColorsVariablesLoader (
51
+
52
+ nameValidateRegexp = variableParams . nameValidateRegexp
53
+ nameReplaceRegexp = variableParams . nameReplaceRegexp
54
+ } else {
55
+ let loader = ColorsLoader (
56
56
client: client,
57
57
figmaParams: figmaParams,
58
- variableParams : variableParams ,
58
+ colorParams : commonParams ? . colors ,
59
59
filter: filter
60
60
)
61
61
colors = try loader. load ( )
62
62
63
- nameValidateRegexp = variableParams . nameValidateRegexp
64
- nameReplaceRegexp = variableParams . nameReplaceRegexp
63
+ nameValidateRegexp = commonParams ? . colors ? . nameValidateRegexp
64
+ nameReplaceRegexp = commonParams ? . colors ? . nameReplaceRegexp
65
65
}
66
66
67
67
guard let colors else {
0 commit comments