diff options
Diffstat (limited to 'lib/commands.py')
| -rw-r--r-- | lib/commands.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/commands.py b/lib/commands.py index ddee8326..53b9e77f 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -254,7 +254,12 @@ def symbol_defs(): @cache def get_defs(document): - return document.find(SVG_DEFS_TAG) + defs = document.find(SVG_DEFS_TAG) + + if defs is None: + defs = inkex.etree.SubElement(document, SVG_DEFS_TAG) + + return defs def ensure_symbol(document, command): |
