Test if panel box-shadow is not null before using length

issue9830
review314791002
This commit is contained in:
Cédric Krier committed 2020-11-23 23:37:58 +01:00
1 parent cd55b6688a
commit ea3705a4f9
1 file changed
+1 -1
+1 -1
View File
@@ -33,7 +33,7 @@
el.parents('.panel').each(function(i, panel) {
panel = jQuery(panel);
var lengths = panel.css('box-shadow').match(/\d+px/g);
if (lengths.length) {
if (lengths && lengths.length) {
lengths = lengths.map(function(length) {
return length.replace('px', '');
});