summaryrefslogtreecommitdiff
path: root/lib/svg
diff options
context:
space:
mode:
Diffstat (limited to 'lib/svg')
-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