mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Handle case when pixel values are undefined or null
This commit is contained in:
parent
115536874d
commit
50a0cd57ef
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user