Browse Source

fix error calling clearThingsToTranslate when it is null in own plans

Ramona Plogmann 1 year ago
parent
commit
b6eee52443
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/src/components/Plans/Plans.jsx

+ 1 - 1
client/src/components/Plans/Plans.jsx

@@ -138,7 +138,7 @@ const Plans = (props) => {
         }
         setTimeout(() => {event.target.scrollIntoView({ behavior: "smooth", block: "center" });}, 300);
       } else { // close history
-        clearThingsToTranslate();
+        if(clearThingsToTranslate) clearThingsToTranslate();
         setTimeout(() => {event.target.scrollIntoView({ behavior: "smooth", block: "end" });}, 300);
       }
       return !prevState;