1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-20 09:41:19 +00:00

Fix: Remove json from displayed text

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-06-06 22:40:20 +02:00
parent b537cc0d31
commit 74979e2672
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -70,6 +70,9 @@ func (d displayElementExec) Display(ctx context.Context, idx int, attributes map
tmpAttrs := map[string]interface{}{}
if err = json.Unmarshal(buf.Bytes(), &tmpAttrs); err == nil {
// Reset text to empty as it was parsable json
attributes["text"] = ""
for k, v := range tmpAttrs {
attributes[k] = v
}