mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +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.
|
||||
*/
|
||||
if (/^\d+\.?(\d+)?$/.test(value.trim())) {
|
||||
if (value && /^\d+\.?(\d+)?$/.test(value.trim())) {
|
||||
return value.trim() + 'px';
|
||||
}
|
||||
return value;
|
||||
|
Loading…
Reference in New Issue
Block a user