fix: step-1 crashing (#44561)

pull/44562/merge
Tom 2021-12-23 00:51:03 -06:00 committed by GitHub
parent 9b15d47566
commit 075bc04a2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -907,8 +907,8 @@ const Editor = (props: EditorProps): JSX.Element => {
if (!previewOpen && showProjectPreview) {
const description = document.getElementsByClassName(
'description-container'
)[0];
description.classList.add('description-highlighter');
)?.[0];
description?.classList.add('description-highlighter');
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.previewOpen]);