Handle empty polyline data.

pull/211/head
Brian White 2023-05-31 19:30:30 -04:00
parent 6f1dd96cca
commit eef26cfc23
1 changed files with 1 additions and 0 deletions

View File

@ -62,6 +62,7 @@ def polyline2pathd(polyline, is_polygon=False):
else:
points = COORD_PAIR_TMPLT.findall(polyline.get('points', ''))
if not points or len(points) < 2: return ""
closed = (float(points[0][0]) == float(points[-1][0]) and
float(points[0][1]) == float(points[-1][1]))