We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3a20f5 commit 8fedd1aCopy full SHA for 8fedd1a
examples/next/toolbar-demo/example-app/app/components/Toolbar.tsx
@@ -79,7 +79,8 @@ export function Toolbar() {
79
<button
80
className="hwp-toolbar-button"
81
onClick={() => {
82
- if (confirm(`Logged in as: ${state.user!.name}\n\nLogout?`)) {
+ const user = state.user;
83
+ if (user && confirm(`Logged in as: ${user.name}\n\nLogout?`)) {
84
toolbar.setWordPressContext({
85
user: null,
86
post: null,
0 commit comments