@deneb-ui/core 2.0.31 → 2.0.32
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/dist/fonts/resolve.js +8 -1
- package/package.json +1 -1
package/dist/fonts/resolve.js
CHANGED
|
@@ -32,7 +32,10 @@ function lookupFontDefinition(value) {
|
|
|
32
32
|
const primary = value.split(',')[0]?.trim().replace(/^['"]|['"]$/g, '');
|
|
33
33
|
if (primary) {
|
|
34
34
|
const primarySlug = normalizeFontId(primary);
|
|
35
|
-
|
|
35
|
+
// Unknown ids used to recurse with the same slug (String.split → stack overflow).
|
|
36
|
+
if (primarySlug && primarySlug !== slug) {
|
|
37
|
+
return lookupFontDefinition(primary);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
return null;
|
|
38
41
|
}
|
|
@@ -97,9 +100,13 @@ function collectFontIdsFromSiteData(siteData) {
|
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
}
|
|
103
|
+
const seen = new WeakSet();
|
|
100
104
|
const walkContent = (node) => {
|
|
101
105
|
if (!node || typeof node !== 'object')
|
|
102
106
|
return;
|
|
107
|
+
if (seen.has(node))
|
|
108
|
+
return;
|
|
109
|
+
seen.add(node);
|
|
103
110
|
if (Array.isArray(node)) {
|
|
104
111
|
node.forEach(walkContent);
|
|
105
112
|
return;
|
package/package.json
CHANGED