Commit 92de535
committed
fix(variables): parse stringified VARIABLE_ALIAS for FLOAT vars (go #22 last edge)
coerceToResolvedType only rescued stringified objects on the COLOR branch
(JSON.parse), so a FLOAT variable aliased to another FLOAT — when the client
stringified the alias object in transit — hit Number()→NaN and was rejected.
That is the exact asymmetry behind figma-mcp-go #22 (color aliases survived,
float aliases got stripped).
Lift the stringified-object rescue ahead of the per-type scalar coercion so it
applies to every resolvedType, deduping the COLOR JSON.parse in the process.
Pure widening: bare-string FLOAT ("abc") still rejects, COLOR bare string still
errors with the same message, native-object aliases unchanged.1 parent 28405b2 commit 92de535
2 files changed
Lines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
15 | 26 | | |
16 | 27 | | |
17 | 28 | | |
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
21 | 32 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
| |||
0 commit comments