From 8b8294441b6b79ff1fd19d93ef1f98091206a545 Mon Sep 17 00:00:00 2001
From: Christina Toegl <toegl@tugraz.at>
Date: Wed, 10 Feb 2021 11:38:45 +0100
Subject: [PATCH] Try to fix another uncaught syntax errors in
 adapter-lit-element

---
 packages/provider/src/adapter-lit-element.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/packages/provider/src/adapter-lit-element.js b/packages/provider/src/adapter-lit-element.js
index e22a1914..613b3db3 100644
--- a/packages/provider/src/adapter-lit-element.js
+++ b/packages/provider/src/adapter-lit-element.js
@@ -286,12 +286,12 @@ export class AdapterLitElement extends LitElement {
                 }
                 break;
             default:
-                // The function should not be called if newValue is empty but name and oldValue are set
+                // The function should not be called if newValue is empty but name is set
                 // This should prevent 'Uncaught SyntaxError: JSON.parse unexpected end of data at line 1 column 1 of the JSON data'
-                if (newValue || !oldValue || !name) {
+                if (newValue || !name) {
                     super.attributeChangedCallback(name, oldValue, newValue);
-                // } else {
-                //     console.log("attributeChangedCallback ignored", name, oldValue, newValue);
+                // } else { //!newValue && name
+                    //     console.log("attributeChangedCallback ignored", name, oldValue, newValue);
                 }
         }
 
-- 
GitLab