We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba1ee25 commit 0816163Copy full SHA for 0816163
src/gridstack.js
@@ -99,7 +99,7 @@
99
var height = val;
100
var heightUnit = 'px';
101
if (height && _.isString(height)) {
102
- var match = height.match(/^([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]+)(px|em|rem|vh|vw)?$/);
103
if (!match) {
104
throw new Error('Invalid height');
105
}
0 commit comments