diff --git a/docs/widgets/services/customapi.md b/docs/widgets/services/customapi.md index bd43a93d6..c392d942c 100644 --- a/docs/widgets/services/customapi.md +++ b/docs/widgets/services/customapi.md @@ -108,9 +108,6 @@ mappings: locations: 1: name # Citadel of Ricks label: Location - - field: locations - label: Location count - format: size # 2 ``` ## Data Transformation diff --git a/src/widgets/customapi/component.jsx b/src/widgets/customapi/component.jsx index 52a27be94..dcd238a51 100644 --- a/src/widgets/customapi/component.jsx +++ b/src/widgets/customapi/component.jsx @@ -101,8 +101,7 @@ function formatValue(t, mapping, rawValue) { }); break; case "size": - value = getLength(value); - value = t("common.number", { value }); + value = t("common.number", { value: getLength(value) }); break; case "text": default: