Skip to content

Commit

Permalink
Update src/components/QueryEditor/OpenAIEditor.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Yeats <16296989+adamyeats@users.noreply.github.com>
  • Loading branch information
alyssabull and adamyeats authored Feb 8, 2024
1 parent 58dd73b commit 4afac32
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/QueryEditor/OpenAIEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ export const OpenAIEditor: React.FC<RawQueryEditorProps> = (props) => {

useEffect(() => {
const currentStoredPrompts = localStorage.getItem('storedOpenAIPrompts');
let allParsedStoredPrompts = [];
if (currentStoredPrompts !== null) {
allParsedStoredPrompts = JSON.parse(currentStoredPrompts);
};
const allParsedStoredPrompts = currentStoredPrompts !== null ? JSON.parse(currentStoredPrompts) : []
setParsedStoredPrompts(allParsedStoredPrompts);
}, [])

Expand Down

0 comments on commit 4afac32

Please sign in to comment.