Skip to content

Commit 85d8f8e

Browse files
authored
Update connect-to-sharepoint.md (SharePoint#9141)
Fixing SharePoint#9138 and SharePoint#9108 to fix the code.
1 parent b93257e commit 85d8f8e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/spfx/web-parts/get-started/connect-to-sharepoint.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,9 @@ Open the `HelloWorldWebPart` class.
207207
</ul>`;
208208
});
209209

210-
const listContainer: Element = this.domElement.querySelector('#spListContainer');
211-
listContainer.innerHTML = html;
210+
if(this.domElement.querySelector('#spListContainer') != null) {
211+
this.domElement.querySelector('#spListContainer')!.innerHTML = html;
212+
}
212213
}
213214
```
214215

0 commit comments

Comments
 (0)