summaryrefslogtreecommitdiffstats
path: root/src/rbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/rbox.js')
-rwxr-xr-xsrc/rbox.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rbox.js b/src/rbox.js
index 598b3b4..fe6a9fa 100755
--- a/src/rbox.js
+++ b/src/rbox.js
@@ -31,7 +31,7 @@ SVG.RBox = function(element) {
/* calculate cumulative zoom from svg documents */
e = element
- while (e = e.parent()) {
+ while (e.parent && (e = e.parent())) {
if (e.type == 'svg' && e.viewbox) {
zoom *= e.viewbox().zoom
this.x -= e.x() || 0