Skip to content

Commit

Permalink
Workaround for BaseElement.get(..., default) bug
Browse files Browse the repository at this point in the history
  • Loading branch information
speleo3 committed Jun 26, 2024
1 parent 920cb34 commit 8dbae4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/sanitize_therion_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _unlink_if_exclusive_clone(self, use: inkex.BaseElement):
# add transform
x = use.get("x", 0)
y = use.get("y", 0)
linked.set("transform", f"translate({x} {y}) " + linked.get("transform", ""))
linked.set("transform", f"translate({x} {y}) " + (linked.get("transform") or ""))

# move after use
parent = use.getparent()
Expand Down
2 changes: 1 addition & 1 deletion extensions/th2ex.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def compute_bbox(self, node, transform=True, use_cache=False):
node_bbox = None

if transform:
transform = node.get('transform', '')
transform = node.get('transform') or ''
else:
transform = ''

Expand Down

0 comments on commit 8dbae4c

Please sign in to comment.