summaryrefslogtreecommitdiff
path: root/lib/svg/units.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-09-29 13:22:05 -0600
committerGitHub <noreply@github.com>2018-09-29 13:22:05 -0600
commit5139c13fd7f43bb4d829e3c8225c51268e4d27d1 (patch)
tree8d89cf6fc362aa261baf9f63d68653c50fe72aa5 /lib/svg/units.py
parentee7ed8f679dd493bd8991ede51bc741c47567b51 (diff)
parent5e9cb83a9375a2b6312f390e84e4ac8e778d04cb (diff)
Merge pull request #316 from inkstitch/lexelby/bug-fixes
more bug fixes
Diffstat (limited to 'lib/svg/units.py')
-rw-r--r--lib/svg/units.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/svg/units.py b/lib/svg/units.py
index c4ec82a0..0de410ab 100644
--- a/lib/svg/units.py
+++ b/lib/svg/units.py
@@ -80,7 +80,10 @@ def convert_length(length):
@cache
def get_viewbox(svg):
- return svg.get('viewBox').strip().replace(',', ' ').split()
+ viewbox = svg.get('viewBox')
+ if viewbox is None:
+ viewbox = "0 0 0 0"
+ return viewbox.strip().replace(',', ' ').split()
@cache