diff options
author | Anders Kaseorg <andersk@mit.edu> | 2022-09-19 14:08:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-19 23:08:12 +0200 |
commit | ed306c0261ab63746040e5d58bb4477c3069a427 (patch) | |
tree | 23b332d2a7df5794d2b98ce39ec26db53df37742 /src | |
parent | d153c375e67f2c2dba82c2fb079c36b8d795e66a (diff) | |
download | jquery-ed306c0261ab63746040e5d58bb4477c3069a427.tar.gz jquery-ed306c0261ab63746040e5d58bb4477c3069a427.zip |
CSS: Don’t trim whitespace of undefined custom property
Fixes gh-5105
Closes gh-5106
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'src')
-rw-r--r-- | src/css/curCSS.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/css/curCSS.js b/src/css/curCSS.js index 15d624bbb..25b4630a5 100644 --- a/src/css/curCSS.js +++ b/src/css/curCSS.js @@ -15,7 +15,7 @@ function curCSS( elem, name, computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; // trim whitespace for custom property (issue gh-4926) - if ( isCustomProp ) { + if ( isCustomProp && ret !== undefined ) { // rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED // as whitespace while CSS does not, but this is not a problem |