]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: specify array type for value
authorLaura Flores <lflores@redhat.com>
Wed, 8 Sep 2021 16:59:37 +0000 (16:59 +0000)
committerLaura Flores <lflores@redhat.com>
Wed, 8 Sep 2021 16:59:37 +0000 (16:59 +0000)
Signed-off-by: Laura Flores <lflores@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts

index bee61022e2ad4836621fb270cf80642e25c4bdb4..5879dbd447107f3fa8b03e9076b64ec174688511 100644 (file)
@@ -89,7 +89,7 @@ export class TelemetryComponent extends CdForm implements OnInit {
   }
 
   private replacer(key: string, value: any) {
-    if (key === 'ranges' || key === 'values') {
+    if ((key === 'ranges' || key === 'values') && (Array.isArray(value))) {
       const x = [];
       for (let i = 0; i < value.length; i++) {
         x.push(JSON.stringify(value[i]));