Handle case when pixel values are undefined or null

This commit is contained in:
Jason Grout 2015-03-26 22:15:18 +00:00
parent 115536874d
commit 50a0cd57ef

View File

@ -611,7 +611,7 @@ define(["widgets/js/manager",
/** /**
* Makes browser interpret a numerical string as a pixel value. * Makes browser interpret a numerical string as a pixel value.
*/ */
if (/^\d+\.?(\d+)?$/.test(value.trim())) { if (value && /^\d+\.?(\d+)?$/.test(value.trim())) {
return value.trim() + 'px'; return value.trim() + 'px';
} }
return value; return value;