Commit d20f6703 authored by André Kremser's avatar André Kremser
Browse files

Allow negative numbers to be passed to parseHeight function fix

parent 08161636
......@@ -99,7 +99,7 @@
var height = val;
var heightUnit = 'px';
if (height && _.isString(height)) {
var match = height.match(/^((-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+)?|-?[0-9]+)(px|em|rem|vh|vw)?$/);
var match = height.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw)?$/);
if (!match) {
throw new Error('Invalid height');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment