html2canvas-pro 2.3.3 → 2.3.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * html2canvas-pro 2.3.3 <https://yorickshan.github.io/html2canvas-pro/>
2
+ * html2canvas-pro 2.3.4 <https://yorickshan.github.io/html2canvas-pro/>
3
3
  * Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
4
4
  * Released under MIT License
5
5
  */
@@ -1727,9 +1727,10 @@ const parseFunctionArgs = (tokens) => {
1727
1727
  let arg = [];
1728
1728
  tokens.forEach((token) => {
1729
1729
  if (token.type === 4) {
1730
- if (arg.length === 0) throw new Error(`Error parsing function args, zero tokens for arg`);
1731
- args.push(arg);
1732
- arg = [];
1730
+ if (arg.length) {
1731
+ args.push(arg);
1732
+ arg = [];
1733
+ }
1733
1734
  return;
1734
1735
  }
1735
1736
  if (token.type !== 31) arg.push(token);
@@ -6728,7 +6729,8 @@ var CSSParsedCounterDeclaration = class {
6728
6729
  };
6729
6730
  const parseCache = /* @__PURE__ */ new Map();
6730
6731
  const parse = (context, descriptor, style) => {
6731
- const rawValue = style !== null && typeof style !== "undefined" ? style.toString() : descriptor.initialValue;
6732
+ let rawValue = style !== null && typeof style !== "undefined" ? style.toString() : descriptor.initialValue;
6733
+ if (rawValue.trim() === "") rawValue = descriptor.initialValue;
6732
6734
  let valueCache = parseCache.get(descriptor);
6733
6735
  if (valueCache) {
6734
6736
  const cached = valueCache.get(rawValue);