From 5fd88f92137d415656f6d690d571592ae73156e7 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 18 Jun 2022 00:38:51 +0200 Subject: [PATCH] fix snapshots for objects --- packages/core/hap.mjs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/core/hap.mjs b/packages/core/hap.mjs index d82ed662..a0107d87 100644 --- a/packages/core/hap.mjs +++ b/packages/core/hap.mjs @@ -86,11 +86,9 @@ export class Hap { } showWhole() { - return `${this.whole == undefined ? '~' : this.whole.show()}: ${this.value}`; - } - - showWhole() { - return `${this.whole == undefined ? '~' : this.whole.show()}: ${this.value}`; + return `${this.whole == undefined ? '~' : this.whole.show()}: ${ + typeof this.value === 'object' ? JSON.stringify(this.value) : this.value + }`; } combineContext(b) {