@rulecad/variables 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/variables.mjs +1 -1
package/package.json
CHANGED
package/variables.mjs
CHANGED
|
@@ -120,7 +120,7 @@ export function resolve(object, { sets = {}, set = {}, display = {}, load } = {}
|
|
|
120
120
|
let src, where;
|
|
121
121
|
if (name.includes('.')) {
|
|
122
122
|
let [s, r] = name.split('.');
|
|
123
|
-
if (!ruleSets[s] && ruleSets[s.replace(/_/g, '-')]) s = s.replace(/_/g, '-'); //
|
|
123
|
+
if (!ruleSets[s] && ruleSets[s.replace(/_/g, '-')]) s = s.replace(/_/g, '-'); // mx_switch.housing_top reads the set named mx-switch (a - is a minus here)
|
|
124
124
|
if (!ruleSets[s]) throw new Error(`"${name}": rule set "${s}" isn't in uses (${Object.keys(ruleSets).join(', ') || 'none'})`);
|
|
125
125
|
if (!ruleSets[s].rules[r]) throw new Error(`"${name}": no rule "${r}" in ${s}`);
|
|
126
126
|
src = ruleSets[s].rules[r].value; where = (n) => (n.includes('.') ? n : `${s}.${n}`); // a rule's names are its own set's
|