Skip to content

Commit 7d57852

Browse files
authored
Fix formula migration issue in get error messages (baserow#4128)
1 parent 523b5d5 commit 7d57852

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web-frontend/modules/builder/elementTypes.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ export class HeadingElementType extends ElementType {
13041304
* is empty to indicate an error, otherwise return false.
13051305
*/
13061306
getErrorMessage({ workspace, page, element, builder }) {
1307-
if (element.value.formula.length === 0) {
1307+
if (!element.value.formula) {
13081308
return this.app.i18n.t('elementType.errorValueMissing')
13091309
}
13101310
return super.getErrorMessage({
@@ -1357,7 +1357,7 @@ export class TextElementType extends ElementType {
13571357
* is empty to indicate an error, otherwise return false.
13581358
*/
13591359
getErrorMessage({ workspace, page, element, builder }) {
1360-
if (element.value.formula.length === 0) {
1360+
if (!element.value.formula) {
13611361
return this.app.i18n.t('elementType.errorValueMissing')
13621362
}
13631363
return super.getErrorMessage({
@@ -1414,7 +1414,7 @@ export class LinkElementType extends ElementType {
14141414
*/
14151415
getErrorMessage({ workspace, page, element, builder }) {
14161416
// A Link without any text isn't usable
1417-
if (element.value.formula.length === 0) {
1417+
if (!element.value.formula) {
14181418
return this.app.i18n.t('elementType.errorValueMissing')
14191419
}
14201420

@@ -1577,7 +1577,7 @@ export class ButtonElementType extends ElementType {
15771577
*/
15781578
getErrorMessage({ workspace, page, element, builder }) {
15791579
// If Button without any label should be considered invalid
1580-
if (element.value.formula.length === 0) {
1580+
if (!element.value.formula) {
15811581
return this.app.i18n.t('elementType.errorValueMissing')
15821582
}
15831583

0 commit comments

Comments
 (0)