aboutsummaryrefslogtreecommitdiffstats
path: root/src/css.js
diff options
context:
space:
mode:
authorJason Bedard <jason+github@jbedard.ca>2018-06-20 22:09:29 -0700
committerGitHub <noreply@github.com>2018-06-20 22:09:29 -0700
commite743cbd28553267f955f71ea7248377915613fd9 (patch)
treef8f4f1498e9876c9821a88a547b8711dc2689d3a /src/css.js
parent0645099e027cd0e31a828572169a8c25474e2b5c (diff)
downloadjquery-e743cbd28553267f955f71ea7248377915613fd9.tar.gz
jquery-e743cbd28553267f955f71ea7248377915613fd9.zip
Dimensions: fix computing outerWidth on SVGs
Fixes gh-3964 Closes gh-4096
Diffstat (limited to 'src/css.js')
-rw-r--r--src/css.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/css.js b/src/css.js
index 19c2f79d1..c3afb0ab7 100644
--- a/src/css.js
+++ b/src/css.js
@@ -107,7 +107,10 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
delta -
extra -
0.5
- ) );
+
+ // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
+ // Use an explicit zero to avoid NaN (gh-3964)
+ ) ) || 0;
}
return delta;