@antv/g-webgpu 1.6.2 → 1.6.3

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.umd.js CHANGED
@@ -11276,8 +11276,14 @@
11276
11276
  var segmentsLength = lineDash.reduce(function (cur, prev) {
11277
11277
  return cur + prev.value;
11278
11278
  }, 0);
11279
- dashSegmentPercent = segmentsLength / totalLength;
11280
- dashRatioInEachSegment = lineDash[1].value / segmentsLength;
11279
+
11280
+ if (segmentsLength === 0) {
11281
+ dashSegmentPercent = 1;
11282
+ dashRatioInEachSegment = 0;
11283
+ } else {
11284
+ dashSegmentPercent = segmentsLength / totalLength;
11285
+ dashRatioInEachSegment = lineDash[1].value / segmentsLength;
11286
+ }
11281
11287
  }
11282
11288
 
11283
11289
  return {