Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit 39b236e

Browse files
Merge pull request #308 from nzzdev/release-6.4.4
Release 6.4.4
2 parents d0d0a64 + 8f920b6 commit 39b236e

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

client/src/elements/schema-editor/schema-editor-table.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ function hasNonEmptyProperty(obj, excludedProperties = []) {
8181
});
8282
}
8383

84+
function isNumeric(cell) {
85+
if (!cell) {
86+
return false;
87+
}
88+
cell = cell.trim(); // remove whitespaces
89+
// check if positive or negative decimal number
90+
if (cell.match(/^[+-]?\d+(\.\d+)?$/) === null) {
91+
return false;
92+
}
93+
return cell && !Number.isNaN(parseFloat(cell));
94+
}
95+
8496
class MetaData {
8597
constructor(initialMetaData, metaDataSchemas, objectFromSchemaGenerator) {
8698
this.data = initialMetaData;
@@ -546,7 +558,7 @@ export class SchemaEditorTable {
546558
}
547559

548560
// if we do not have a floating point number now, return the original
549-
if (str.search(/-*\d*\.\d*/) !== 0) {
561+
if (isNumeric(str) === false) {
550562
return cell;
551563
}
552564

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nzz/q-editor",
3-
"version": "6.4.3",
3+
"version": "6.4.4",
44
"description": "Q Editor - The editor part of the Q toolbox",
55
"homepage": "https://github.com/nzzdev/Q-editor",
66
"bugs": {

0 commit comments

Comments
 (0)