@unocss/core 0.4.0 → 0.4.4
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/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -397,7 +397,7 @@ ${rules}
|
|
|
397
397
|
continue;
|
|
398
398
|
if (typeof handler === "string")
|
|
399
399
|
handler = { matcher: handler };
|
|
400
|
-
if (handler
|
|
400
|
+
if (handler) {
|
|
401
401
|
processed = handler.matcher;
|
|
402
402
|
handlers.push(handler);
|
|
403
403
|
usedVariants.add(v);
|
|
@@ -407,6 +407,8 @@ ${rules}
|
|
|
407
407
|
}
|
|
408
408
|
if (!applied)
|
|
409
409
|
break;
|
|
410
|
+
if (handlers.length > 500)
|
|
411
|
+
throw new Error(`Too many variants applied to "${raw}"`);
|
|
410
412
|
}
|
|
411
413
|
return [raw, processed, handlers];
|
|
412
414
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -360,7 +360,7 @@ ${rules}
|
|
|
360
360
|
continue;
|
|
361
361
|
if (typeof handler === "string")
|
|
362
362
|
handler = { matcher: handler };
|
|
363
|
-
if (handler
|
|
363
|
+
if (handler) {
|
|
364
364
|
processed = handler.matcher;
|
|
365
365
|
handlers.push(handler);
|
|
366
366
|
usedVariants.add(v);
|
|
@@ -370,6 +370,8 @@ ${rules}
|
|
|
370
370
|
}
|
|
371
371
|
if (!applied)
|
|
372
372
|
break;
|
|
373
|
+
if (handlers.length > 500)
|
|
374
|
+
throw new Error(`Too many variants applied to "${raw}"`);
|
|
373
375
|
}
|
|
374
376
|
return [raw, processed, handlers];
|
|
375
377
|
}
|